0% found this document useful (0 votes)
6 views69 pages

MS Access

The document provides comprehensive notes on Microsoft Access, detailing its functions for managing databases, including creating, editing, and organizing information in tables. It outlines the steps for designing a database structure, including determining fields, tables, and relationships, as well as methods for creating a database file. Additionally, it emphasizes the importance of good database design for effective data management and retrieval.

Uploaded by

Kennedy githaiga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
6 views69 pages

MS Access

The document provides comprehensive notes on Microsoft Access, detailing its functions for managing databases, including creating, editing, and organizing information in tables. It outlines the steps for designing a database structure, including determining fields, tables, and relationships, as well as methods for creating a database file. Additionally, it emphasizes the importance of good database design for effective data management and retrieval.

Uploaded by

Kennedy githaiga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 69
10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS Quality and Updated DIPLOMA AND CERTIFICATE MATERIALS ~ SECONDARY + Teach Yours | MICROSOFT ACCESS. Ms-Access is a Window-based program used to manage information, which is in form of databases. Ithelps in storing information about different subjects in separate tables hitpsknecnotes.co kelmicrosoft-access-notes! F PARLIAMENT Universities * CPAREVISION KITS ~ Search Seare About This Site ‘169 012824, 9:34 AN It also enables the user to add and edit records, sort, query and also print records Note. Ms-Access can be installed as a stand-alone program, but it is MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS We're a team of professionals who have taught in several mainly found within the Microsoft Office suite. Itis very useful for routine and simple database management tasks. Starting Microsoft Access. schools and been involved in marking of KCPE and KCSE exams. This 1. Click Start, point to Programs, then click Microsoft Access. -oR- Click on the Microsoft Access icon on the Microsoft Office Shortcut Bar, if its displayed on the desktop. Features (Parts) of the Microsoft Access Window. + Menu bar. website has curated content by giving you the best simplified study materials and revision papers for your Virtual Training & De Save time, control costs & delive experiences to your learners & ¢ CloudShere Cc 1234 67 8 9 1011 1314.15 16 17 18 20 21 22 23 24 25 It appears horizontally at the top of the window. Itis used to issue Ms-Access commands. 27 28 29 30 31 «Aug They appear after the Menu bar. They contain icons (buttons). hitpsknecnotes.co kelmicrosoft-access-notes! Archives 2169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS The toolbars provide many of the tools you need to find, edit, and print records. You can use the buttons in the toolbars to: + Add or delete records. + Preview and Print data. + Check spellings. + Cut, copy, or paste selected text, fields, whole records, or the entire datasheet. + Sort records + Find or replace values, and also Filter records. Scroll bars. They enable the user to see data not visible on the screen. + Status bar. Itis a horizontal bar at the bottom of the screen that displays information about commands, toolbar buttons, and other properties. singing depanese fencher tutor tendon tendon Geers) (Herssontee) COMPONENTS OF A DATABASE (Database Terminologies). The material (stuff) that a database program stores, organizes and manages for you. hitpsknecnotes.co kelmicrosoft-access-notes! Violin tutor Birmingha August 2024 (69) July 2024 (92) June 2024 (81) April 2024 (161) March 2024 (3) February 2024 (1) January 2024 (60) December 2023 (28) November 2023 (163) March 2023 (208) January 2023 (8) December 2022 (243) November 2022 (91) October 2022 (45) September 2022 (555) August 2022 (293) July 2022 (256) June 2022 (491) May 2022 (1240) 169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS » April 2022 (1415) Accollection of related data organized in rows and columns, > March 2022 (1263) collection of data about a specific topic. » February 2022 (440) collection of records that describe a similar data. > January + An element of a table that contains a specific item of information 2022 (484) > December + Asingle unit of information within a table. 2021 (337) > November 2021 (125) + The place where data is placed within a database » October 2021 (7) + Acollection of related characters. > September 2021 (80) + A.group of characters that form a unit of information such as Age, > August Telephone number, or a Job classification 2021 (52) > July 2021 (108) In a datasheet, each column represents a Field, » June 2021 (18) > May 2021 (93) » April 2021 (56) ‘One field holds one piece of data. E.g,, ina Student record, the pr (66) possible fields are Name, Admission number, and Age. > March 2021 (108) All the fields for one student constitute a Record. > December 2020 (218) > August 2020 (176) + This is the name that indicates each column (field) » July 2020 (45) > March 2020 (2) + Itis the column title/ heading or a label for a field > February 2020 (1) hitpsknecnotes.co kelmicrosoft-access-notes! 4169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS Field Type: It is the type of data stored in a field. A group of logically related fields treated as a unit. It can be a collection of data about a person, a place, an event, or some other item. Aset of all the fields for one row in a table. Each record contains fields for storing your information. For example, Name Age Origin Sex. John 23 Machakos Male In a database table, each row represents a Record. Microsoft Japanese Exe! tutor tor tendon Landon ( C ) DESIGNING A DATABASE STRUCTURE. Good database design makes the database easy to maintain. Data is stored in tables and each table contains data about only one subject, e.g., Customers. hitpsknecnotes.co kelmicrosoft-access-notes! Singing teacher London > January 2020 (1) > December 2019 (1) » September 2019 (7) Recent Posts > Demonstrate Environmental Literacy May/Aug 2022 Past Paper (L 5) August 13, 2024 > Demonstrate Environmental Literacy May/Aug 2022 Past Paper (L 5) August 13, 2024 > Demonstrate Environmental Literacy May/Aug 2022 Past Paper (L 5) August 13, 2024 > Demonstrate Environmentar Literacy May/Aug 2022 Past Paper (L 5) August 13, 2024 5169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS Before using Ms-Access to build tables, queries, forms, and other objects, it is advisable that you first sketch out and rework the design ona paper. The following are some of the basic steps in designing a database. 1. Determine the purpose of the database file and how it has to be used. + Think about the questions that you would like the database to answer. + Gather the forms used to record the data + Sketch out the reports you would like the database to produce. This helps you to determine what facts (Fields) will be stored in the database and what table each fact belongs to. 2. Determine the fields needed in the database. Each field is a fact about a particular subject. E.g, if you are designing a database that will handle your customers, you might need to store the following facts: Company name, Address, City, State, & Phone no. Japanese tutor Chemistry tutor iendon Manchester C ) C ) Create a separate field for each of these facts. hitpsknecnotes.co kelmicrosoft-access-notes! Demonstrate Environmental Literacy May/Aug 2022 Past Paper (L5) August 13, 2024 Demonstrate Environmental Literacy May/Aug 2022 Past Paper (5) August 13, 2024 Demonstrate Environmental Literacy May/Aug 2022 Past Paper (L 5) August 13, 2024 Demonstrate Entrepreneurial Skills May/Aug 2022 Past Paper (L.5) August 13, 2024 Demonstrate Communication Skills May/Aug 2022 Past Paper (L.§) August 13, 2024 Demonstrate Environmental Literacy May/Aug 202 Past Paper (L 4) August 13, 2024 6169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS When determining the fields that are needed, ensure that the following design principles are observed: * Include all of the information you will need. + Store the information in the smallest logical parts. g., aname is, usually split into 2 or 3 fields; First Name, Middle Name & Last Name. This makes it easy to sort the data. + The Fields should not be similar to each other. E.g,, in a Suppliers table, you should not create fields such as Product1, Product2, & Product3, because it will be difficult to find all suppliers who provide a particular product. This will also force you to change the design of your database if a supplier provides more than 3 products. In the Products table, you need only one field for Products. 3. Determine the type of tables needed in the database. Each table should contain information about one subject. The list of fields you have will enable you to know what tables you need hitpsknecnotes.co kelmicrosoft-access-notes! Popular posts: > HISTORY AND GOVERNMENT FORM 3 NOTES. > TOPIC 1 FORMS OF BUSINESS UNITS > BIOLOGY FORM 1 NOTES > BIOLOGY FORM 3 NOTES > HISTORY AND GOVERNMENT FORM 2 NOTES. > GEOGRAPHY FORM 3 NOTES. > HISTORY AND GOVERNMENT FORM 1 NOTES. > BIOLOGY FORM 2 NOTES > CHAPTER SEVEN : HOME ‘TRADE > CHAPTER 1: ~ INTRODUCTIC TO BUSINESS STUDIES 189 10728124, 9:34 aN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS development London Japanese E.g, if you have a HireDate field, its subject is an employee, and so it belongs in the Employees table. You might have a table for Customers, a table for Products, and a table for Orders. 4, Identify the field or fields with unique values in each record. In order for Ms-Access to connect information stored in separate tables; for instance, to connect a customer with all the customer's orders, each table in your database must include a Primary key (a field or set of fields that uniquely identifies each individual record in the table) 5. Determine the relationships between tables. After dividing your information into tables and identifying primary key fields, you need a way to tell Ms-Access how to bring related information back together again in meaningful ways. This is done by defining Relationships between the tables. hitpsknecnotes.co kelmicrosoft-access-notes! Singing teacher London 20 21 22 23 24 25 27 28 29 30 31 « Aug 8169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS Japanese tutor Londen instructor 6. Refining the design. After designing the tables, fields, and relationships you need, study the design and detect any mistakes that might remain. If there is any, change your database design before entering the data, 7. Entering data and creating other database objects. After making sure that the table structures meet your needs, add your data to the tables. CREATING A MS-ACCESS DATABASE. Database is a collection of data and objects, such as tables, queries, or forms, related to a particular topic or purpose. MS-ACCESS DATABASE FILES. Using Ms-Access, you can manage all your information from a single database file Database Fil hitpsknecnotes.co kelmicrosoft-access-notes! 9169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS + Acollection of logically related records. * Acollection of all tables and objects used to manage data. A Database file consists of rows and columns. Japanese tutor Singing teacher Londen London Gen) Within the file, you can use database objects such as Tables - to store your data. + Queries ~ to find and retrieve any data you want. + Forms - to view, add, and update data in tables. + Reports ~ to analyze or print data in a specific layout Methods of creating an Ms-Access Database file. + Create a new Blank database file. You can create a Blank database & then add the Tables, Forms, Reports & other objects later. This requires the user to define each database element separately allowing him/her to create a self-defined database. hitpsknecnotes.co kelmicrosoft-access-notes! 10169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 1. Click New on the File menu or on the Standard toolbar (or press CTRL#N). 2, Under New, click Blank Database, then click the OK button. 3. In the File New Database dialog box, specify a name & location for the database file, then click on the Create button to display the Database window. Note. All Ms-Access databases are saved with an automatic extension of mdb 4, Click on the tab that has the object you want to create, e.g., Tables, and follow the instructions provided in the resultant dialog box. Database window - The window that appears when you open an Ms- Access database. |t displays tabs/ buttons for the database objects, such as Tables, Queries, Forms, Reports, Macros and Modules. These shortcuts are used for creating new database objects and opening existing objects + Create a database file using the Database Wizard. The Database Wizard allows the user to create in one operation the required Tables, Forms, and Reports for the type of database you choose. The wizard provides a set of databases where the user is free to modify them according to his/her needs. hitpsknecnotes.co kelmicrosoft-access-notes! ‘189 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 1. On the File menu, click New. 2. Under New from template, click General templates. 3. Click the Databases tab, then double-click the icon for the kind of database you want to create, (or click the icon, then click the OK button) 4. In the File New Database dialog box, specify a name & location for the database. 5, Click on the Create button, then follow the instructions in the Wizard to define your new database. DATABASE TABLES. A Table is a collection of data about a specific topic. Defining the structure of a database Table. Tables organize data into columns (called fields) & rows (called records). E,g,, in a Products table, each field contains the same type of information for every product, such as the Product's name. Each record in that table contains all the information about one product, such as the Product's name, supplier ID number, units in stock, hitpsknecnotes.co kelmicrosoft-access-notes! 12169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS and so on When defining a table structure, enter the following: + Field Name: Each column in a database table is called a Field. Field name is the name that identifies each column (ie, itis the title of a field or column). To enter names in the columns, for example, enter the First Name in its own column & Last Name in a separate column. + Field Type: This specifies the type of data to be used/ stored in the field + Field Size: Specifies the maximum no. of characters that can be typed in that column, hitpsknecnotes.co kelmicrosoft-access-notes! 13169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS Field width - the no. of spaces required to hold the largest data item to be stored in the field FIELD DATA TYPES. A Data type is the characteristic of a field that determines what type of data it can store / hold Field Data types available in Ms-Access. 1)A Text field can store text or combination of text & numbers, such as names, addresses, or any numbers that do not require calculations, such as Telephone nos., or Postal codes A Text field stores up to 255 characters. 2)A Memo field is used to store lengthy text & numbers that are more than 255 characters, such as notes or descriptions. ‘Memo field can store up to 65,536 characters. 3) ANumber field is used to store numeric data that would be included in mathematical calculations. Stores 1, 2, 4, or 8 characters. Note. A Number field only stores Whole numbers (.¢,, numbers without decimal values) from 0 to 255. hitpsknecnotes.co kelmicrosoft-access-notes! 1469 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 4)A Currency field is used for currency values or to store any calculations that involve money or that require a high degree of accuracy. This prevents rounding off during calculations. Stores 8 characters, ‘A Currency field is accurate to 15 digits to the left of the decimal point & 4 digits to the right. 5. Date/Time. A Date or Time field is used to store dates and times depending on the formats chosen. It stores 8 characters. 6. Yes/No. Used for data that can be only one of two possible values, such as Yes/No, True/False, On/Off. Stores 1 character. ‘7T)AutoNumber is a field data type that automatically stores a unique number for each record as it is added to a table. hitpsknecnotes.co kelmicrosoft-access-notes! 15169 112824, 9:34AM MICROSOFT ACCESS NOTES - KNEC | TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS It automatically numbers the records in the table. Itis used for unique ‘Sequential (incrementing by 1) or Random numbers that are automatically inserted when a record is added It stores 4 characters. 8. OLE Object. ‘An OLE Object field allows one to bring data & files from another program into the current field Used for OLE objects (such as Ms -Word documents, Ms -Excel spreadsheets, Pictures, or Sounds) those were created in other programs using the OLE (Object Linking and Embedding) protocol. 9)A Hyperlink field links the fields to another table within the same database or in a different database. 10. Lookup Wizard. The Lookup Wizard is used to create a field that allows you to choose a value from another table or from a list of values using a combo box. hitpsknecnotes.co kelmicrosoft-access-notes! 16169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS Choosing data types and field sizes The following considerations determine the kind of data type to use fora field: + The kind of values you want to allow in the field, e.g,, you cannot store text in a field with a Number data type. + The amount of storage space you want to use for values in the field + The types of operations you want to perform on the values in the field, ¢.g., Ms-Access can sum values in Number or Currency fields, but not values in Text or OLE Object Note. A field's data type defines what kind of values you can enter in afield. E.g,,if you want a field to store numerical values or data that you can use in calculations, set the field's data type to Number or Currency. A field whose data type is Text can store data consisting of either text or number characters. CREATING A DATABASE TABLE. Ms-Access provides 3 ways of creating a blank (empty) table; hitpsknecnotes.co kelmicrosoft-access-notes! 1189 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS + Use the Table The Wizard enables the user to choose the fieldsfor the table from a variety of predefined tables such as Business contacts, Household inventory, or Medical records. * Create a table in Design viewwhere you can add fields, define how each field appears or handles data, and create a primary key. + Enter data directly into a blank datasheet. When you save the new datasheet, Ms-Access will analyze your data and automatically assign the appropriate data typeand format for each field TO CREATE A TABLE USING THE DATASHEET VIEW. Datasheet view ~ A window that displays data from a Table, Form, or Query, in a row-and-column format. In Datasheet view, you can edit fields, add and delete data, and search for data, 1. Click New on the File menu or on the Standard toolbar (or press CTRL#N) 2. Under New, click Blank Database, then click the OK button. 3. In the File New Database dialog box, specify a name & location for the database file, then click on the Create button to display the Database window. 4, Under Objects, click Tables, then click New on the Database window toolbar. hitpsknecnotes.co kelmicrosoft-access-notes! 18169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 5, Double-click Datasheet view (or click on Datasheet view, then choose the OK button). A blank Datasheet with rows and columns is displayed. 6. Enter the Field names. To rename each field/columnn. Double-click the column name. -OR- Click in the column, then choose Rename Column on the Format menu. Type the Field name, then press the ENTER key. 7. Click in the cells and enter your data. Press the TAB key to go to the next field or record 8. After adding data to all the columns you want to use, save the Datasheet table. 9. If you do not set a Primary key before saving the newly created table, Ms-Access will ask if you want it to create a primary key for you. If you answer Yes, Ms-Access will create an AutoNumber primary key. After saving the table, Ms-Access will assign data types to each field based on the kind of data you have entered. hitpsknecnotes.co kelmicrosoft-access-notes! 19169 112824, 9:34AM MICROSOFT ACCESS NOTES - KNEC | TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS Note. Any columns you leave empty will be deleted when you save the Datasheet. Customer Orders: Table Order Customer Company ci Required i Number ID Name y Date 11022 BSBEV B's Beverages. London —-25-May Rio De 11023 HANAR — Hanari Carnes 09-May Janeiro Eastern 11024 EAST C London —10-May Connection To add or edit data in a datasheet. 1. To change data within a field, click in the field you want to edit, then type the data To replace the entire value, move the pointer to the leftmost part of the field until it changes into the plus pointer, then click to select. Type the data. Notes. + To correct a typing mistake, press the BACKSPACE key. + To cancel your changes in the current field, press the ESC key. To cancel your changes in the entire record, press the ESC key again before you move out of the field + When you move to another record, Ms-Access saves your changes. To rename a field in a table in Datasheet view. hitpsknecnotes.co kelmicrosoft-access-notes! 20169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS Method 1. 1, Double-click the field selector of the field that you want to change. 2. Type the new field name, then press the ENTER key to save it. Method 2. 1. Click in the column that you want to change. 2. On the Format menu, choose Rename Column. 3. Type the new field name, then press the ENTER key. To change the Column Width in Datasheet view. Method 1. 1. Click in the column whose width you want to change. 2. On the Format menu, click Column Width. 3. Type the desired width in the Field Size box, then choose the OK To make the column width fit an entry, click Best fit. Method 2. hitpsknecnotes.co kelmicrosoft-access-notes! 21169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 1. Point to the edge of the column whose width you want to change. The pointer becomes a double-headed arrow. 2. Drag the arrow to increase or decrease the column width. To change the Font, Appearance, Font Size, Colour & Underline of text in a field or record in Datasheet view. Method 1. 1, Select the text, Record or Field whose contents you want format. 2. On the Formatting toolbar, click the arrows to the right of the Font, Font Size, & Font Color button, then choose the options you want, or click the Bold, Italic, Underline Method 2. 1. On the Format menu, click Font, then choose the options you want, in the Font dialog box. To change the Row Height in Datasheet view. 1. Click in the row / record whose height you want to change. 2. On the Format menu, click Row Height. 3. Type the desired height in the Row Height box, then choose the OK ‘SELECTING FIELDS & RECORDS IN A DATASHEET USING THE MOUSE. To select Do This hitpsknecnotes.co kelmicrosoft-access-notes! 22169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS Asingle field Point to the left edge of the field. When the pointer changes into a Plus, click the left mouse button. -oR- Click in the field, then press F2 Adjacent fields click the left edge of a field, then drag to extend the selection. -oR- Select the first field; hold down the SHIFT key, then press the Left or Right arrow to extend the selection Acolumn Click the field selector. Adjacent columns click the field name at the top of the column, then drag to extend the selection Arecord (row) Click the Record selector. ~oR- Click in the row, then click Select Record on the Edit menu. Multiple records click the record selector of the first record, then drag to extend the selection hitpsknecnotes.co kelmicrosoft-access-notes! 23169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS All records Click Select All Records on the Edit menu (or press CTRL+A) Field selector - A small box or bar that you click to select an entire column in a datasheet. Row selector ~ A small box or bar to the left of a record that, when clicked, selects an entire row in table in a Datasheet view. To move between records by using record Navigation buttons ina datasheet. The navigation buttons are located at the bottom of the window in Datasheet or Form view. You can use these buttons to move quickly between records. To Move to First record Next record Previous record (1 record to the left) Last record New record hitpsknecnotes.co kelmicrosoft-access-notes! Click 3 4 4a 24169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS ‘Add a field (column) to a table in Datasheet view. Note. A Datasheet view table consists of 30 columns. To insert an additional column at any time in Datasheet view, 1. Click in the column to the right of where you want to insert anew column, 2. On the Insert menu, click Column. To insert a new record (row) in Datasheet view. 1. Click in the row below where you want to add the new record 2. On the Insert menu, click New Record, (or click New Record button on the toolbar), Save a record in a datasheet. Ms-Access automatically saves the record you are adding or editing as soon as you move the insertion point to a different record, or when you close the datasheet you are working on + To save the data in a record while editing, click Save Record on the Records Delete a field from a table in Datasheet view. 1, Select the column you want to delete. 2. On the Edit menu, click Delete Column. Delete a record (row) from a table in a Datasheet. hitpsknecnotes.co kelmicrosoft-access-notes! 25169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 1. Click the row selectorof the record you want to delete. 2. On the Edit menu, click Delete Record (or click Delete Record on the toolbar), Delete an item (contents of a field or record). 1, Select the field, text, or other item that you want to delete. 2. Press DELETE (or click Delete on the Edit menu). CREATE A TABLE IN DESIGN VIEW. Design view ~A window that shows the design of the database objects: tables, queries, forms, reports, and macros. In Design view, you can create new database objects and modify the design of existing ones. 1. Press F11 to switch to the Database window. 2, Under Objects, click Tables, then click New on the Database window toolbar. 3, Double-click Design View. Access takes you to the design view of your table. 4. Define each of the fields in your table. + Click in the Field Name column and type a unique name for the field. + Click the arrow in the Data Type column, and select the data type you want. hitpsknecnotes.co kelmicrosoft-access-notes! 28169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS + Inthe Description column, type a description of the information the field will contain. The description is optional 5. Define a primary key field before saving your table, Primary key — One or more fields that can be used to identify each record in a table. A primary key is used to refer to related records in other tables (it is used to relate a table to foreign keys in other tables) Note. If you do not define a primary key, Ms-Access asks if you want ‘Access to create one for you when you save the table. 6. To save your table, click Save on the File menu or on the toolbar, then specify a name for the table. 7. Switch to Datasheet view, then start entering records ‘Switch between views of a table. 1. On the View menu, click Design view or Datasheet view (or click the View button on the Standard toolbar) FIELD PROPERTIES. The table's Design view is divided into 2 parts. The lower partis used to display and assign field properties to selected fields. Field properties ~ a set of characteristics that provide additional control over how the data in a field is stored, entered, or displayed. Each data type has a different set of properties. hitpsknecnotes.co kelmicrosoft-access-notes! 27169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS The different field properties include: The characters that can be entered/ stored in a Text or Number field. IdSize property defines/ controls the maximum no. of The Format property specifies how (the way) data is displayed in a field & printed Number & Currency fields provide predefined display formats. They include Currency, Fixed, General, Percent, Scientific, General data, Medium date, Medium time. + Decimal places. Itis used to define the no. of decimal places in values. This option is used on fields that already have the Fixed format such as in Number and Currency fields. + Default value. It allows you to define a value that will automatically be inserted into the field as you add new records. It is used in Text and Memo fields. For example, to insert the current date in the Admission date field use “Date ()’ The default value affects only new records inserted. tion Rule. hitpsknecnotes.co kelmicrosoft-access-notes! 28169 112824, 9:34AM MICROSOFT ACCESS NOTES - KNEC | TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS It allows you to create an expression or a formula that will test data when being entered into the field. It automatically rejects faulty/flawed entries, e.g., entering very large or very small figures in the Age or Salary fields. Validation Rule Description Between 18 and 55 Limits an age field from 18 to 55. <10000 Allows any value less than 10000 <=500 AND <=1000 Accepts any entry between 500 and 1000. >Date() Allows entries whose dates are the current date or later. ~ converts the field entry to Uppercase. < ~ converts the field entry to Lowercase + Allow Zero Length. Applies to Text and Memo field data types. Setting the value in Allow Zero Length property to YES and the Required property YES, the field must contain at least one character. hitpsknecnotes.co kelmicrosoft-access-notes! 0169 112824, 9:34AM MICROSOFT ACCESS NOTES - KNEC | TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS This is an alternative name used (other than the fieldname) in order to appear in the fieldname header button in Table datasheet view and as a label in Forms They provide a neat and descriptive name since the fieldname should be kept small for practical use [Yes (Duplicates OK)] - Gives sorted, indexed field and can allow data duplicates. [Yes (No duplicates)] - Gives sorted, indexed field but cannot allow data duplicates Note. Itis not available for Memo or OLE object data types. + New Values. Applies only to AutoNumber fields. Ms-Access can increment the AutoNumber field by 1 for each new record, or fill in the field with a randomly generated no., depending on the New Values property setting that you choose. Note. To check the Field properties set for the records in a table, click Properties on the Edit menu. Rename a field in a table in Design view. hitpsknecnotes.co kelmicrosoft-access-notes! 31169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 1. Double-click the field name you want to change 2. Type the new field name. 3. Click Save on the toolbar or on the menu to save your changes. Set or change the Primary key in Design view. Primary key is a field that uniquely identifies each record in a database table. Examples of key fields include ~ Identification numbers, Registration numbers, User codes, etc. Using a Primary key is a way of telling Ms-Access to: + Make sure no two records have the same value within that field + Keep records sorted by the entries of the Primary key fields. There are 3 kinds of primary keys that can be defined in Ms-Access: 1, AutoNumber primary keys. ‘An AutoNumber field can be set to automatically enter a sequential no. as each record is added to the table. Choosing an AutoNumber field as the primary key for a table is the simplest way to create a primary key. If you have a field that contains unique values such as ID numbers, you can select that field as the primary key. You can specify a primary hitpsknecnotes.co kelmicrosoft-access-notes! 32169 112824, 9:34AM MICROSOFT ACCESS NOTES - KNEC | TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS key for a field that already contains data as long as that field does not contain duplicate values or Null values. Null - A value you can enter in a field or use in expressions and queries to indicate missing or unknown data. Some fields, such as primary key fields, cannot contain Null values. 3, Multiple-field primary keys. In situations where you cannot guarantee the uniqueness of any single field, you can choose two or more fields as the primary key. This commonly arises in situations where a table is used to relate two other tables in a many-to-many relationship. 1. Open a table in Design view. 2, Select the field or fields you want to define as the Primary key. To select one field, click the row selector for the desired field. To select multiple fields, hold down the CTRL key, then click the row selector for each field, 3. On the Edit menu, click Primary key. (Or click the Primary Key button on the toolbar). Note. A Primary key field cannot be left empty when editing and entering records. Once you assign a primary key for a table, Access will prevent any duplicate or Null values from being entered in the primary key fields ‘Add a field (column) to a table in Design view. hitpsknecnotes.co kelmicrosoft-access-notes! 33169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 1. Click in the row below where you want to add the field. To add the field to the end of the table, click in the first blank row. 2, Click Insert Rows button on the toolbar (or on the Insert menu, choose Rows). Double-click in the new column, then type a unique name for the field. Delete a field from a table in Design view. This permanently removes a field plus all the data in it from the database. 1. Select the field(s) you want to delete. To select one field, click the field's row selector. To select a group of fields, drag through the row selectors of the fields. 2. On the Edit menu, click Delete Rows (or click Delete Row on the toolbar), Change a field's data type in Design view. 1. Click the arrow in the Data Type column of the field you want to change, then select the new data type. 2. Click Save on the toolbar. Ms-Access converts the data type. Caution, If the data type conversion would result in lost values, Access displays a message telling you that errors occurred during conversion before it actually saves the changes. Click Cancel to cancel the changes. Click OK to continue and save the changes. Change the field size of a Text or Number field. hitpsknecnotes.co kelmicrosoft-access-notes! 4169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS Field size controls the maximum no. of characters that can be entered into a text field and the kind of numeric values that can be entered into a numeric field. 1. In Design view, click the field whose FieldSize property you want to set. 2. In the lower portion of the window on the General tab, click the FieldSize property For a Text field, type the maximum no. of characters to allow in the field (up to 255) For a Number field, click the arrow and select the desired field size. Set the data display format for a field in a table. 1. In Design view, click the field you want to format. 2. In the lower portion of the window, click the arrow next to the Format property box, then click a format from the list. Set the no. of decimal places to display for a field in table Design view. 1. In Design view, click the field you want to define decimal places for. 2. Inthe lower portion of the window, click the arrow next to the DecimalPlaces property box, then click the desired no. of decimal places. CREATE A TABLE BY USING THE TABLE WIZARD. 1. Click New on the File menu or on the toolbar (or press CTRL#N), 2. Under New, click Blank Database. hitpsknecnotes.co kelmicrosoft-access-notes! 35069 1072824, 9:04AM MICROSOFT ACCESS NOTES - KNEC /TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 3. In the File New Database dialog box, specify a name & location for the database, then click Create to open the Database window. 4, Under Objects, click Tables, then click New on the Database window toolbar. 5. Double-click Table Wizard, then follow the directions in the Table Wizard dialog boxes. Note. If you want to modify or extend the resulting table, you can do so in Design view when you have finished using the Table Wizard. Open a database table. 1. Inthe Database window, under Objects, click Tables. 2. Click the table you want to open. To open the table in Datasheet view, click Open, To open the table in Design view, click Design. Exercise (a). 1. (@). Define the following terms as used in Database Management systems: + Field Name. Field Type. Database File, (b). Give five different field data types found in Microsoft Access and explain each. hitpsknecnotes.co kelmicrosoft-access-notes! 38169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 2. What are the procedures you have to follow when designing a database? Exercise (b). 1. Differentiate between: (a). Table and Record. (b). Field and Field name. 2. Create a simple record of a company, having the following fields; Company's Name, Address, City, State, and Phone number. 3. Create a Personal records database giving the following details; Father's Name, Baptismal Name, Last Name, Origin, Sex, Date of Birth, Age, Primary and Secondary schools attended, College, Career and Hobbies. Include the relevant field data types and formats. 4, Create a database giving the following details; Name of company, Address, Phone number, Years of existence, Location, Number of employees, and what it does (operations) 5. Create a database of an employer who decides to keep a record of all his employees, under the following lines; Name of employee, Sex, ‘Age, Origin, Date he/she was employed, Salary, Department of work, Working hours for each employee, Marital status, Education level, and ID card number. 6. farmer decides to keep a record of his farm produce of a certain season. Create a database showing the following; Name of grain, Produce in tonnes. COPY OR MOVE AN ITEM. 1. Select the items you want to copy or move. To copy the item, click Copy on the Edit menu or on the toolbar. hitpsknecnotes.co kelmicrosoft-access-notes! 7169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS To move the item, click Cut on the Edit menu or on the toolbar. 2. Click the location where you want to place the item. 3. Click Paste on the Edit menu or on the toolbar. Copying a table. Copying can be used to reproduce tables and/or data within tables. 1. Select the table in Datasheet view. 2. Click Copy on the Edit menu or on the toolbar. 3. Click the location where you want to place the item, 4, Click Paste on the Edit menu or on the toolbar. Access will then ask you to enter a name for the new table. It will then ask whether you want to paste the structure and data or just to append the database records. Appending refers to adding records at the bottom of an existing table or file. To append the records, choose Paste Append on the Edit menu. SORTING OF RECORDS. This allows you to arrange your records ina logical order in the database. It can either be in Ascending or Descending hitpsknecnotes.co kelmicrosoft-access-notes! 38069 order - in Alphabetical, Chronological, or Numeric. 41. In Datasheet view, click in the field to be sorted. Method 1. Click Sort on the Record menu, then click on the order to apply; Ascending or Descending. Method 2. On the Standard toolbar, click A-Z button (to sort in Ascending order), or click Z-A button (to sort in Descending order). HIDING AND UNHIDING OF COLUMNS WHEN EDITING. Purpose. You may want to hide a column for 3reasons; 6 Prevent anybody from accessing the information. 6 Prevent the data in those columns from being printed. hitpsknecnotes.co kelmicrosoft-access-notes! 39169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 6 In case you want to suppress display of some columns in a database view, i.e. reduce the size of a database table in order to view more columns at once. To hide columns in Datasheet view. 4. Move to the column you want to hide. 2. Onthe Format menu, click Hide column. The selected column disappears from the screen. To Unhide columns. 4. Onthe Format menu, click Unhide column. A list of hidden columns appears. 2. Click to select the checkboxes of all columns that you want displayed. FREEZING AND UNFREEZING OF COLUMNS. Freezing makes the selected column to remain fixed on the screen while scrolling. This enables the user to see the data in a column especially ina database table with very many columns. hitpsknecnotes.co kelmicrosoft-access-notes! 4069 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS When a column is freezed, it stays at the left-most position while the rest of the columns continue to move or scroll in and out of view. Unfreeze is removing the Freeze command. To Freeze column(s) in Datasheet view. 4. Click on the column you want to freeze. 2. Onthe Format menu, click Freeze column. To Unfreeze columns. 4. Select the column to unfreeze. 2. Onthe Format menu, click Unfreeze All columns. FILTERING OF RECORDS. Filtering refers to sieving/ examining out particular records from the database. The records you sieve/ select out can be printed, deleted, or edited. There are 3 types of filters in Access. (i). Filter by Selection. hitpsknecnotes.co kelmicrosoft-access-notes! 69 1728, eu ast McROSOFT ACCESS NOTES —KNEC /TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS This filter allows you to choose a criteria for sieving out records by selecting them directly from the table in Datasheet view. 41. Open the table in Datasheet view. 2. Select the cell that contains the criteria that you need, E.g. under First Name, select Philip. 3. Onthe Records menu, click Filter, then choose Filter By Selection (or click Filter By Selection on the Standard toolbar). Access displays all the records that meet the criteria, e.g., all people in the database whose first names is Philip. Note. If you want to sieve in all records except the ones selected, click Filter Excluding Selection. (ii). Filter by Form. This filter opens up a Form where you can give a more elaborate criterion. 41. Open the table in Datasheet view. hitpsknecnotes.co kelmicrosoft-access-notes! 42169 2. Onthe Records menu, click Filter, then choose Filter By Form, (or click Filter By Form on the toolbar). A Form will appear where you can type in or choose the criteria you want, e.g., To list all people called Philip, click under First Name, then type ‘Philip’ or chose it from the drop down list. The following can be used; First Name Last Name Peterson Kamau It looks fora person called Peterson Kamau. Age >18 Displays all people above 18. Between 25 and 30 Displays records of all people aged between 25 & 30 Country In (Uganda, Kenya, Tanzania) Displays people from Uganda, Tanzania or Kenya. Date hitpsknecnotes.co kelmicrosoft-access-notes! 4369 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS >2004/01/34 Displays all records created on the specified date and after. Between 93/10/34 and 95/7/14 Displays all records created between the indicated dates. Date of Birth Date () -30 Displays all records of people born 30 days ago. Between Date () and Date () -30 Displays records of people born within the last 30 days. Sports Like *ball Displays all records with all sorts of ball games. Not Football Displays all records of people who do not play football. Awards Is Null Displays all records given the award ‘Null’. Is Not Null Displays all records that do not have the award hitpsknecnotes.co kelmicrosoft-access-notes! 4069 ‘Null’, 3. Onthe Records menu, click Apply Filter/Sort, (or click the Apply Filter button on the toolbar). (iii), Advanced Filter/Sort. This filter allows one to sort and filter at the same time. Note. You can sort and filter at the same time or you can perform each independently. 1. Open the table in Datasheet view. 2. Onthe Records menu, click Filter, then choose Advanced Filter/Sort. Access will take you to QBE grid. From this grid, you have a field list in the top half and the grid table. The grid table allows you to choose fields for filtering or sorting. To insert a field(s), double-click it from the field list (or click once in the grid, then select the field from the drop down list). 3. When you have specified your criteria, click Apply Filter/Sort on the hitpsknecnotes.co kelmicrosoft-access-notes! 4569 Records menu, (or click the Apply Filter button on the toolbar). That filter stays in effect until you delete it from the QBE grid. Note. To remove a filter and get back the original table, click Remove Filter/Sort on the Records menu. Advanced Filter/Sort window — A window in which you can create a filter from scratch. You enter criteria expressions in the filter design grid to restrict the records in the open form or datasheet to a subset of records that meet the criteria, PRINTING. Setting up the paper. You can change the Page Setup for your table to affect the way it will print. 4. On the File menu, choose Page Setup. 2. From the Page Setup dialog box, Click the Margins tab, to change the margins of the printing page. To include the headings in the printed document, select the Print Headings checkbox. hitpsknecnotes.co kelmicrosoft-access-notes! 4669 Click the Page tab, then change the Orientation of the paper, and the Paper size. Actual Printing. Before you sent the job for printing, make sure you have set the print options you want to apply to your print job. 4. On the File menu, choose Print (or press CRTL+’P’). 2. From the Print dialog box, Under Printer, click the arrow next to the Name box, then select the printer you are using. Under Print range, select the specific pages to print. To print only certain records in the datasheet, select the records, then click Selected Record(s). In the Number of Copies box, select the desired copies to be printed per page. To change the Print Quality, Paper Type, Paper Size and Orientation, click Properties. hitpsknecnotes.co kelmicrosoft-access-notes! 47169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 3. After setting the options, choose OK to send the print job to the printer. RELATIONSHIPS IN A MS-ACCESS DATABASE FILE. To store your data, create one table for each type of information that you track. After setting up the different tables for each subject, you can define relationships between the tables. Relationship - An association established between common fields (columns) in two tables. Defining relationships is a way of telling Ms-Access how to bring information/ data from multiple tables back together again in a query, form, or report. After defining the relationship, you can create queries, forms, and reports to display information from several tables at once. Relating two tables. In order to relate two tables, each table should include a field or set of fields that uniquely identifies each record stored in the table, Such a field is called the Primary key of the table. The Primary key field relates two tables so that Ms-Access can bring together the data from the two tables for viewing, editing, or printing hitpsknecnotes.co kelmicrosoft-access-notes! 469 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS In one table, the field is a Primary key that you set in table Design view. That same field also exists in the related table as a Foreign key. ‘Suppliers: Table ‘Suppliers 1D 1 2 Products: Table Product Name Chai Chang Aniseed Syrup Camarvon Tiger Company Name Exotic Liquid New Orleans Grandma Kell Tokyo Trade Suppliers ID 1 39 1 7 1 13 2 53 ‘A Product Key ~ A unique ID, such as a Customer ID, that distinguishes one record from another within a table. In the Suppliers table, enter a Supplier ID, Company name, and so on, for each supplier. The Suppliers ID is the primary key, In the Products table, you include the Suppliers ID field, so that when you enter a new product, you can identify its supplier by entering that supplier's unique ID number. The Suppliers ID is the foreign key in the Products table. hitpsknecnotes.co kelmicrosoft-access-notes! 4969 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS Define relationships between tables. When you create a relationship between tables, the related fields may not have the same names, but must have the same data type. A relationship can be One-to-one, One-to-many, or Many-to-many. Define a one-to-many or a one-to-one relationship. 1. Close any tables you have opened. You cannot create or modify relationships between open tables. 2, Press F11 to switch to the Database window. 3. Click Relationships on the Tools menu or on the Standard toolbar. 4, If you have not yet defined any relationships in your database, the ‘Show Table dialog box is automatically displayed. 5. Drag the field that you want to relate from one table to the related field in the other table. In most cases, you drag the primary key field (which is displayed in bold text) from one table to a similar field (often with the same name) called the foreign key in the other table. To drag multiple fields, press the CTRL key, click each field, and then drag them. 6. The Edit Relationships dialog box is displayed. Check the field names displayed in the two columns to ensure they are correct. You can change them if necessary. 7. Set the relationship options if necessary, then click the Create button to create the relationship. 8, Close the Relationships Window. When you close the Relationships window, Access asks if you want to save the layout. Whether you save the layout or not, the relationships hitpsknecnotes.co kelmicrosoft-access-notes! 50169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS you create are saved in the database. Relationships window — A window in which you view, create, and modify relationships between tables and queries. Many-to-many relationship. This is an association between two tables in which one record in either table can relate to many records in the other table. To establish a many-to-many relationship, create a third table and add the primary key fields from the other two tables to this table. For example, an Order Details table can relate the Orders and Products tables. Its primary key consists of 2 fields: OrderlD and ProductID. The Order Details table can list many products and many orders, but each product can only be listed once per order, e.g., 51 as shown below. So combining the OrderlD and Product fields produces an appropriate primary key. Orders Details: Table Order ID Product ID 10249 4 10249 51 10250 41 10250 51 10250 65 hitpsknecnotes.co kelmicrosoft-access-notes! 51169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS View existing relationships. 1. Press F11 to switch to the Database window. 2. Click Relationships on the toolbar (or on the Tools menu). 3. Do one of the following: To view all the relationships defined in the database, + Click Show Alll Relationships on the toolbar. To view the relationships defined for a particular table, * Click the table, and then click Show Direct Relationships on the toolbar. 4, Click Clear Layout on the toolbar to remove all tables from the Relationships window. 5, To add the table back, click Show Table on the toolbar, double-click the table, and then click Close. 6. Click Show Direct Relationships on the toolbar. Remove a table from the Relationships window. * Click the table you want to remove, then press the DELETE This action affects only the display of the Relationships window. The table and relationships remain in the database. Delete a relationship. hitpsknecnotes.co kelmicrosoft-access-notes! 52169 012824, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 1. Close any open tables. 2. Press F11 to switch to the Database window. 3. Click Relationships on the Tools menu or on the toolbar. 4. If the tables whose relationship you want to delete are not displayed, click Show Table on the toolbar and double-click each table you want to add. Then click Close. 5. Click the relationship line for the relationship you want to delete (the line will turn bold when it is selected), then press the DELETE Exercise (a). 1. (a). What are Database management software? (b). What are the advantages of storing data on the computer using a database tool such as Microsoft Access as opposed to storing in paper files. 2, Distinguish between the following terms in relation to a database + DBMS and database. + Records and Fields. (4 marks). 3, Define the term Sorting, (2 marks). 4, (a). Differentiate between Primary key and Relationship. (b). What is the importance of the Primary key. Exercise (b). 1. (a). What are Database management software? QUERIES. A Query is a question about the data stored in your tables, or a request to perform an action on the data. You use queries to view, change, and analyze data in different ways. A query can find & bring together data that meets conditions that you specify from multiple tables. It can also serve as the source of data for a Form, or a Report. hitpsknecnotes.co kelmicrosoft-access-notes! 53169 112824, 9:34AM MICROSOFT ACCESS NOTES - KNEC | TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS A query can also update or delete multiple records at the same time, and perform predefined or custom calculations on your data There are 4 major types of queries in Microsoft Access. + SELECT QUERIES. A Select query is a query that asks a question about the data stored in your tables and returns a result set in the form of a datasheet— without changing the data. You use a select query to: + Bring together data from one or more than one tables by using the criteria you specify and then display the data in the order you want. + Update records in the datasheet of a select query (with some restrictions) * Group records and calculate Sums, Counts, Averages, and other types of totals. A select query is the most common type of query. Creating a Select query. You can create a query with a wizard or from scratch in Query Design view. In Design view, you specify the data you want to work with by adding the tables or queries that contain the data, and then by filling in the Design grid. + You add fields to the design grid by dragging them to the field lists. + What you will see in the query’s results will be determined by the fields, sort order, and criteria you add to the design grid. + Create a Select query. hitpsknecnotes.co kelmicrosoft-access-notes! 54169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS 1. In the Database window, click Queries under Objects, then click New on the Database window toolbar. 2. In the New Query dialog box, click Design View, then click OK. 3. In the Show Table dialog box, click the tab that lists the tables or queries whose data you want to work with, 4, Double-click the name of each object you want to add to the query, and then click Close. 5. Add fields to the Field row in the Design grid, and if you want, specify criteria and a sort order. 6. To view the query's results, click View on the toolbar. Design grid: The grid that you use to design a query or filter in query Design view or in the Advanced Filter/Sort window. + PARAMETER QUERIES A Parameter query is a query that when run displays its own dialog box prompting you for information, such as criteria for retrieving records or a value you want to insert in a field You can design the query to prompt you for more than one piece of information; For example, + You can design it to prompt you for two dates. Ms-Access can then retrieve all records that fall between those two dates + You can create a monthly earnings report based on a parameter query. When you print the report, Ms-Access displays a dialog box asking for the month that you want the report to cover. When you enter a month, Ms-Access prints the appropriate report + CROSSTAB QUERIES. hitpsknecnotes.co kelmicrosoft-access-notes! 55169 10728124, 9:34 AN MICROSOFT ACCESS NOTES — KNEC / TVET CDACC STUDY MATERIALS, REVISION KITS AND PAST PAPERS ACrosstab query is a query that calculates a Sum, Average, Count, or other type of total on records, and then groups the result by two types of information — one down the left side of the datasheet and the other across the top. Use Crosstab queries to calculate and restructure your data for easy analysis Note. A Crosstab query displays the same information, but groups it both horizontally and vertically making the datasheet more compact and easier to analyze. Creating a Crosstab query You create a crosstab query from scratch in query Design view. Create a Crosstab query. 1. In the Database window, click Queries, then click New. 2. In the New Query dialog box, click Design View, and then click OK. 3. In the Show Table dialog box, click the tab that lists the tables or queries whose data you want to work with. 4, Double-click the name of each object you want to add to the query, and then click Close. 5. Add fields to the Field row in the Design grid and specify criteria, 6. On the toolbar, click Query Type, and then click Crosstab. 7. In the Design grid, you specify the field's values that will become column headings, the field's values that will become row headings, and the field's values to sum, average, count, or calculate. + For the field(s) whose values you want to appear as row headings, 19. + For the field whose values you want to appear as column headings, click the Crosstab row, then click Row Hea click the Crosstab row, and then click Column Heading, You can choose Column Heading for one field only. hitpsknecnotes.co kelmicrosoft-access-notes! 58169

You might also like