Access 2010 Intermediate Skills

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Access 2010 Intermediate Skills"

Transcription

1 Access 2010 Intermediate Skills

2 (C) 2013, BJC HealthCare (St Louis, Missouri). All Rights Reserved. Revised June 5, 2013.

3 TABLE OF CONTENTS OBJECTIVES... 3 UNDERSTANDING RELATIONSHIPS... 4 WHAT IS A RELATIONSHIP?... 4 CREATING RELATIONSHIPS... 7 EDITING TABLE RELATIONSHIPS USING JOIN PROPERTIES EDITING RELATIONSHIPS USING REFERENTIAL INTEGRITY CONTROLLING DATA ENTRY THE IMPORTANCE OF FIELD PROPERTIES SETTING UP DEFAULT VALUES AND REQUIRED FIELDS DEVELOPING INPUT MASKS DEFINING VALIDATION RULES CONTROLLING DATA ENTRY: LOOKUPS PROPERTY SHEETS USING EXPRESSIONS IN OBJECTS WHAT IS AN EXPRESSION? USING EXPRESSIONS IN QUERIES USING EXPRESSIONS IN FORMS USING EXPRESSIONS IN REPORTS OTHER TYPES OF QUERIES QUERY OPTIONS UPDATE QUERIES MAKE TABLE QUERIES APPEND QUERIES DELETE QUERIES PARAMETER QUERIES

4 OBJECTIVES Upon completion of this course, participants will: Describe relationships, join types, and referential integrity Create relationships at the query and database levels Change the output of a query by modifying the join type between the tables Control data entry by enforcing referential integrity between tables Describe the impact of the cascade options within referential integrity Manage the properties of different field types Set default values for fields Mark fields as required for data entry Create an standard and custom input mask to format the entered data Create a validation rule for a field Create a custom message for a validation rule Create a data lookup based on data entered into a list Create a data lookup that references another table Create and use expressions in forms, queries, and reports Create custom calculations Combine data from separate fields Create, modify, and run an Update query Create and run a Make Table query Create and run an Append query Create and run a Delete query Create and run a Parameter query 3

5 WHAT IS A RELATIONSHIP? UNDERSTANDING RELATIONSHIPS Newcomers to the database world have a hard time seeing the difference between an Excel spreadsheet and a database table. They see the table grid structure and recognize that databases allow you better organize and query the data in new ways, but many don t notice the power of the relationship function that gives this software its true power. Relationships allow you describe the connections between different database tables. These connections allow you to perform powerful cross-table queries called Joins. RELATIONSHIP TYPES There are three types of relationships in Access. These are named according to the number of table rows that may be involved in the relationship. ONE-TO-ONE RELATIONSHIP These relationships occur when each entry in the first table has one, and only one counterpart or match in the second table. A One-to-One relationship is created if both the related fields are primary keys or have unique indexes. An index helps find and sort records faster. One-to-One relationships are rare because most of the time a more efficient way is to just store both fields in the same table. An example of a One-to-One relationship can be found in our class file between the Employee Data and Employee Salary. One record that includes the employee basic name and address info in the Employee Data table matches one record that contains the employee s salary info in the Employee Salary table. The information is stored in separate tables for confidentiality reasons. 4

6 The Primary key in the first table matches up with the primary key in the second table. ONE-TO-MANY RELATIONSHIP These relationships are the most common type of database relationship. They occur when each record in the first table corresponds to one or more records in the second table. A One-to-Many relationship is created if only one of the related fields is a primary key or has a unique index. An example of a One-to-Many relationship can be found with our class file between the Patient List and the Visits table. A patient name record found in the Patient List table can be matches several times with visit information on the Visits table. This means that the one patient can visit many times! The Primary key in the first table matches more than one field in the second table. MANY-TO-MANY RELATIONSHIP These relationships occur when each record in the first table matches one or more records in the second table and each record in the second table also matches one or more records in the first table. Access cannot resolve manyto-many relationships. The application will produce an error immediately, as it cannot determine in which order to match the records. An example of a Many-to-Many relationship can be found with our class file between the Patient and the Doctor List tables. A patient can see several doctors in the Doctor table and a doctor can see multiple patients in the Patient table. This means there is no easy way to join the two tables because there are too many matches for Access to try to resolve. Doctors can see more than one patient. Patients can see more than one doctor. 5

7 SOLVING A MANY TO MANY RELATIONSHIPS Tables that need to be joined but can t because of a Many-to-Many relationship can exist in theory but can t exist physically. There is no way to connect the fields properly. The solution to joining these tables so that data can be retrieved is creating a Junction table. The Junction or Joining table can solve the problem by containing the primary key from each of the tables and combine them to make up a unique primary key. This Junction table then provides the bridge that provides a one-to-many relationship on each side. One-to-Many One-to-Many Two primary keys combine to make a unique record. An example of a Junction table can be found with our class file between the Patient List, Doctor List and Visits table. The combination of the Doctor ID, Patient ID, and Visit Date field provides a unique record. Now that we joined these tables we can create queries that pull fields from all three tables. Dr last name, patient Last name, gender, visit date and length. 6

8 CREATING RELATIONSHIPS It is best to create the relationships before beginning to add data to your tables. Consider drawing your relationships on paper before trying to create the links in your database. When you create a relationship between two tables, Access will determine what type of relationship exists between the tables. QUERY LEVEL VS DATABASE LEVEL RELATIONSHIPS You can create a relationship between tables at the query level or at the database level. When you create a relationship at the query level, the relationship exists for that query only. When you create a relationship at the database level, the relationship extends into all database objects you create including forms, reports, queries, etc. When you create a relationship, it s not necessary for the linking fields to share the same names but they must be the same data type. The exception to this is when the primary field has the AutoNumber data type. You can match an AutoNumber field with a Number field as long as the field size property for both of the fields is the same. Example of Relationship Created in Database Level Example of Relationship Created in Query Level 7

9 Linking Two Tables at the Query Level 1. Open the Query in Design View. 2. Drag the linking (common) field from the first table to the same data type field on the second table. Drag and drop one field on top of the other to join. 3. Save the Query. Instructions Comments 1. Open the Access Intermediate Class database. 2. Double-click the Employee Payroll Query. Note how many records return when the query is run. 3. Click the Home tab. 4. Under the Views group, click Design View. Note that no link exists between the Employee Data table and the Employee Salary table. 5. Drag the ID field from the Employee Data table onto the ID field in the Employee Salary table. Your mouse will turn into a rectangle. Make sure your mouse is positioned on the correct field before releasing it. 6. Run the Query. Note the number of records is greatly reduced. Access is no longer matching each record in the Employee Data table with every record in the Employee Salary table. RELATIONSHIP TOOLS WITHIN THE RELATIONSHIP WINDOW You can display a window that shows what relationships are set up within your database. This is found under the Database Tools tab. The purpose of the Relationship Window is to show you how the fields between different tables are linked. When you click on the Relationships button, a separate window opens. The Relationship Tools tab also appears. This tab offers ways to edit the details of a selected relationship, adjust the layout, or print a Relationship report. You can also add more tables to the window or adjust which relationships or tables are being viewed. Clears the Relationship display window. Adds new tables to the display. Opens the Edit Relationships window to control all the options with the joined tables. Closes the Relationship window. Creates a printable map of joined tables within the database. Controls which relationships display in the window. 8

10 Opening the Relationship Window 1. Click the Database Tools tab. 2. Under the Show/Hide group, select the Relationships button. 3. Click Close when finished. NOTE! note Relationships are automatically saved as you click the Create button. If you are asked to save, you are saving the layout (the position of the tables on the screen) and not the relationships you have created. Linking Two Tables at the Database Level (within the Relationships Window) 1. Open the database. 2. Click the Database tools tab. 3. Under the Show/Hide group, click the Relationships button. 4. Under the Relationships group, click Show Table Select the table(s) you want to join and click Add. (Use the Ctrl key to select more than one table.) Click Close. Arrange the tables within the Relationships window. 9

11 8. 9. Drag the linking (common) field from one table to the same data type field in the other table. Verify the information in the Edit Relationships dialog box. Notice that the field names don t have to be the same just the data type. 10. Click Create. Instructions Comments 1. Click the Database Tools tab. 2. Under the Show/Hide group, click Relationships. Opens the Relationship window. 3. Under the Relationships group, click Show Table. Allows you to choose which tables you want to display in the window. 4. Select Employee Data table and click Add. 5. Select Employee Salary table and click Add. 6. Click Close. Closes the Show Table window. 7. Position your mouse on the border of the Employee Data table. 8. Resize the table to view it in its entirety. Resizing the table makes it easier to see all the field names. 9. Repeat steps 8 & 9 to resize the Employee Salary table. 10. Drag the ID field from the Employee Data table onto the ID Make sure you have the correct fields. field in the Employee Salary table. 11. Click Create. Joins the tables and displays the join in the Relationship window. 12. Click Close. Closes the Relationship dialog box. 13. Close the Relationships window. 14. Click Yes to save the layout of the tables. Saves the position and size of the displayed tables. 15. Click the Create tab. 16. Under the Query group, click the Query Design button. 17. Add the Employee Data table and Employee Salary table. Note that the link between the tables. 18. Close without saving. 10

12 EDITING TABLE RELATIONSHIPS USING JOIN PROPERTIES When two tables are joined in a relationship or query, the join tells Access how the data in the table is related and the type of join will dictate which records the query performs an action on. It is important to understand the nature of join properties and how join types greatly impact data output. JOIN TYPES There are three join types that Access supports. The primary table is determined by the way you create the links (from left to right or from right to left). EQUAL JOIN An equal join, which is the default join type, will return only those records where there is a match between both tables. LEFT OUTER JOIN A left outer join will return all records of the table designated to be the primary (or left) table, and matching records, if any, from the linked table. RIGHT OUTER JOIN A right outer join will return all records of the table to be the primary (or right) table, and matching records, if any, from the linked table. Patients Visits JOIN PROPERTIES You can control the output of your queries by changing the properties of the links between the tables. This is called Join Properties. Most often, you will want to do this at the query level. The default show only matched fields. Left Outer Equal Right Outer NOTE! note You can right-click on the join line and choose Join Properties from the short-cut menu. 11

13 Changing the Join Type in a Query 1. Open the query in Design View, if necessary. Double-click on the join line you want to modify. 2. Select a Join Type: 1, 2, or Click OK. 4. Run the query. Instructions Comments 1. In the Navigation Pane, find the Tables category. 2. Open the Patient List table. There are 50 patient records. 3. Close the table. 4. Open the Visits table. There are 40 visit records. 5. Close the table. 6. In the Navigation Pane, find the Queries category. 7. Open the Patients and Visits query. How many records display? 8. Switch to Design View. 9. Double-click on the join line between the Patient List and Visits tables. The Join Properties dialog box will appear. Note that the default option is to return only those records where there is a match between the tables. 10. Select the Include All Records from Patient List and only those records from Visits where the joined fields are equal option. 11. Click OK. Note that the join line now shows which table is the one and which table is the many in the relationship. 12. Run the query. Note the number of records has increased as all patients are now listed. 13. Save and close the query. 14. Close the database. 12

14 Changing the Join Type in the Relationships Window 1. Click the Database Tools tab. 2. Under the Relationships group, click the Relationships command. 3. Double-click on the join line you want to modify. 4. Click the Join Type command button. 5. Select the desired join option. 6. Click OK. 7. Close the Relationships window. NOTE! note When you make a change in the Relationships window, the new setting will be applied to all subsequent queries created that use those tables. 13

15 EDITING RELATIONSHIPS USING REFERENTIAL INTEGRITY Referential integrity is a system of rules that Microsoft Access uses to ensure that relationships between records in linked tables are valid. Referential integrity makes sure that you don't accidentally add, delete, or change records that violate the rules you set. For instance, you may set referential integrity on a relationship between tables such as Patients and Visits to ensure that you do not record a visit for a patient that does not exist in the Patients table. Referential integrity is set at the database level using the Relationships window. Enforcing Referential Integrity 1. Open the Relationships window. 2. Add the tables and create the appropriate links, if necessary. 3. Double-click on the join line for the tables for which you want to establish referential integrity. 4. Click the Enforce Referential Integrity check box. 5. Click the Cascade Update and Delete options, if required. 6. Click OK. 7. Close the Relationships window. Instructions Comments 1. Open the Employee Data table. Notice how many employees there are. 2. Close the table. 3. Open the Employee Salary table. 4. Add a new record with the following information: Note that the customer 9999 does not exist in ID: 999 the Customers table. DOH: 7/5/2012 Position Lead Nurse Rate: 30 Manager: Collins 5. Click elsewhere in the table to save the record. The record is allowed to be saved. 6. Delete the record. 7. Close the table. 8. Click the Database Tools tab. 9. Under the Show/Hide group, select the Relationships button. 10. Double-click on the join line between the Employee Data The Edit Relationships window will open. and Employee Salary table. 14

16 Instructions Comments 11. Click the Enforce Referential Integrity checkbox. 12. Click OK. 13. Close the Relationships window. 14. Reopen the Employee Salary table. 15. Add a record using the same information in step Click elsewhere in the table to attempt to save the A message stating that the record cannot be record. saved will appear. 17. Click OK to close the error message. The record cannot be saved as the customer does not exist in the Customers table. 18. Press ESC to cancel the record. 19. Close the table. 20. Close the database. CASCADE UPDATE/DELETE RELATED FIELDS The Cascade Update option allows you to change a record in the primary table (the one side of the one-to-many) and have Access automatically update all matching records in related tables. The Cascade Delete option allows you to delete a record in the primary table and have Access delete all matching records in the related table. Use caution when activating either option! Activating the Cascade Update and Cascade Delete Options 1. Open the Relationships window. 2. Add the tables and create the appropriate links, if necessary. 3. Double-click on the join line for the tables for which you want to initiate the Cascade Update or Cascade Delete options. 4. Activate the Enforce Referential Integrity checkbox. The Cascade options will become available. 5. Select the desired option. 6. Click OK. 7. Close the Relationships window. 15

17 THE IMPORTANCE OF FIELD PROPERTIES CONTROLLING DATA ENTRY The fields in your database have settings that determine the type of data they can store, how the data is displayed, and what you can do with the data. The field s data type controls what can be entered into the field. For instance, text data cannot be entered into a field assigned the Number data type. The data type also determines the actions you can perform on a field and how much space the data uses. Each field also has properties that define its characteristics and behavior. Field properties control the details of information, including character or number length, default values, validation rules, captions, and input masks that control how data gets entered into the field. These properties make it easier to enter and manage data within the field. CONTROLLING THE SIZE OF TEXT FIELDS You can control the size of a Text field by setting its Field Size property. A Text field can store from 1 to 255 characters, although the default field size is 50. Be sure you select a field size that will accommodate your data needs and apply the field size before any data exists for the field. If you reduce the field size for a field that has data in it, you will truncate data. Changing the Field Size Property for a Text Field 1. Open the table in Design View. 2. Click in the field to select it. The field properties area at the bottom will update to display the available properties for the data type. 3. Edit the Field Size value. 4. Save the table. NOTE! note A Text field can store from 1 to 255 characters but a memo field can store up to 65,535 characters. 16

18 NOTE! note Making a field larger will have no effect on existing data. Instructions Comments 1. Open the Gourmet Lunch for Data Properties database. 2. Open the Employees table. There are 20 customer records. 3. Switch to the Design View. 4. Select the State field. Note that the Field Size property is set to In the Field Properties area, click in the Field Size line. 6. Change the value to 2. This will accommodate a two letter abbreviation for each state. 7. Close and save the table. A message will appear to warn you that some data may be lost. This message only appears when the field size is shortened and data exists in the field. 8. Click OK to confirm the new size. 9. Switch to the Datasheet View. 10. Click in the State column for the first record. 11. Try to type more than two characters. Access will ignore any characters past the two allowed for the field. 12. Close the table. 17

19 CONTROLLING THE SIZE OF NUMBER AND CURRENCY FIELDS For Number and Currency fields, the Field Size property is particularly important, because it determines the range of values the field can store. For example, a one-bit Number field can store only integers ranging from 0 to 255. The Field Size property also determines how much disk space each Number field value requires. When you enter numeric data into your table, you need to know how Access treats the information, based on the field s properties. Number properties should be assigned before data is entered into the field to avoid decimal data being lost. Number Field Size Description Decimal info allowed? Disk space in bytes Byte Stores numbers from 0 to 255 No 1 Integer Stores numbers from 32,768 to 32,767 No 2 Long Integer Stores numbers from 2,147,483,648 to 2,147,483,647 (Default) No 4 Single Stores numbers from E38 to E 45 for negative values and from E 45 to E38 for positive values Yes 8 Double Stores numbers from E308 to E 324 for negative values and from E 324 to E308 for positive values Yes 12 Decimal Stores numbers from 10^28 1 through 10^28 1 Yes 16 Changing the Field Size Property for a Number Field 1. Open the table in Design View. 2. Click in the field to select it. The field properties area at the bottom will update to show the available properties for the data type. 3. From the Field Size drop down list, select the size based on the number of decimal places you need stored. 4. Save the table. 18

20 Instructions Comments 1. Open the Entrees table. 2. Click in the Cost field for the first record. The current price is $ Change the price to Move off the record. The price changes to $ Switch to the Design View. 6. Click in the Cost field. The field s data type is Number. The Field Size is set to Long Integer. 7. Change the Field Size property to Single. This setting will allow decimal info to be stored. 8. Change the Format to Currency. 9. Save the table. 10. Switch to the Datasheet View. 11. Change the Cost value in the first record to Move off the record. The price remains at $9.75 because decimal information is allowed to be stored in the field. 13. Close the table. SETTING UP DEFAULT VALUES AND REQUIRED FIELDS There may be times when you find you are typing the same values into a field more often than not. For instance, you might be tracking patient information and most of the patients you are working with live in the state of Missouri. Rather than continue to type the state value in every time, you can set a default value for the field and change the value when there is an exception. SETTING UP THE DEFAULT VALUE The Default Value property allows you to specify a value that will be automatically entered when you add a new record. You can accept the default value or type a new value over it. Adding a Default Value for a Text Field 1. Open the table in Design View. 2. Select the appropriate field. 3. In the Field Properties area at the bottom of the screen, click in the Default Value line. 4. Enter a value. 5. Save the table. NOTE! note The default value for the field will display in the new record line at the bottom of the table. 19

21 Instructions Comments 1. Open the Lunch Orders table. 2. Switch to the Design View. 3. Select the Order Date field. 4. In the Field Properties area, click in the Default Value line. 5. Type =NOW() This means every Order Date field entry will be preloaded with today s date. 6. Save the table. 7. Switch to the Datasheet View. Note that today s date is automatically filled in at the bottom of the table within the new record row. DESIGNATING REQUIRED FIELDS By default, only the primary key field in the table is required for data entry because, by definition, it is not allowed to have a null value or remain blank. However, there are many instances when data is required for other fields. For instance, patient name fields should not be blank. In a table tracking patient information, the primary key is assigned to a field that will be unique to each patient, whether it is a patient s social security number or another unique identifier. However, it is possible that two patients could have the same name. This is the reason, in fact, that the primary key should not be assigned to the name fields. In your patient information table, even though the name fields are not set as primary, you do want to have as complete a set of data as possible. The Required property allows you to specify that data must be entered into a field. Set a required field before entering data into the table. If you are applying this setting to a field that contains data, Access will warn you that the field s data integrity rules have changed. Access will test the new rule against the existing data and will warn you if you have records which violate the rule. Setting a Field to be Required for Data Entry 1. Open the table in Design View. 2. Select the appropriate field. 3. In the Field Properties area at the bottom of the screen, click in the Required line. 4. Select Yes from the drop-down list. 5. Save the table. 6. Click Yes if presented with a message that data integrity rules have changed. Clicking Yes will cause Access to check each record to see if the rule is valid. 7. Click Yes to continue testing. 20

22 NOTE! note If there is an issue with the data, Access will present another message. At this point, you should cancel the action, and go back and address the issues in your data. Instructions Comments 1. Open the Lunch Orders table. 2. Switch to the Design View. 3. Select the Main field. 4. In the Field Properties area, click in the Required line. 5. Select Yes from the drop-down list. The field record will not be saved unless this field is filled. 6. Adjust the following fields to be required as well: Side Sweet Drink 7. Save the table. 8. Click Yes to test the changes to the data integrity It runs a data integrity check. rules. 9. Switch to the Datasheet View. 10. Add a New Order but skip the Main field. Use the tab key to quickly pass by the field. 11. Click within another record. Because Access attempted to save the record and the Main field was blank, an error message appears. 12. Click OK to close the error message. 13. Press ESC to remove the record. 14. Close the Lunch Orders table. 21

23 DEVELOPING INPUT MASKS An input mask is a data entry template for a field. Input masks are often used for data such as social security numbers, zip codes, or telephone numbers. With an input mask you can control the type and number of characters that can be entered into the field. For instance, within an input mask applied to a zip code field, you can specify whether letters are allowed, whether the extended zip code (+4) is required or optional, and whether or not a hyphen is stored with the field. At the same time, you can assign the Text data type to the field and limit the number of characters stored within the database to optimize large sets of data. You can also use literal display characters such as hyphens, underscores, or parentheses to give your users information about what you expect to be entered in the field. Access gives you the ability to choose from a list of commonly used masks or to create the mask from scratch. THE STRUCTURE OF AN INPUT MASK Series of characters Each section is separated by a semi-colon (;) \-9999;0;_ Literal characters Placeholder character There are three sections to an input mask structure: The first section is the series of characters that makes up the mask. Use F1 within the Input Mask property to see a complete set of characters. The second section is used to define whether literal characters (such as parentheses and hyphens) used within the mask are stored with the value. The third section is used to identify the placeholder character used to format the field for the data entry user. The default character used is the underscore (_). USING THE PRE-DEFINED INPUT MASK Common masks such as phone number or zip code formats can be applied quickly using the Input Mask Wizard. The Input Mask Wizard offers a list of pre-defined masks to choose as well as a list of placeholder characters. The Wizard gives you the choice to store any additional symbols such as the dash in a phone number, with the data or not. Applying a Pre-Defined Input Mask 1. Open the table in Design View. 2. Select the appropriate field. 3. In the Field Properties area, click in the Input Mask line. Build button 4. Click the Build button. 22

24 5. Select a mask from the column on the left. 6. Click Next. 7. Select a different placeholder character to display when the user clicks in the field, if desired. 8. Click Next. 9. Choose to store the literal characters in the mask (hyphens, etc.) in the field or to store the data only. 10. Click Next. 11. Click Finish. 12. Save the table. 23

25 NOTE! note Make sure your field size is large enough to store any literal characters you choose to store with the data. Instructions Comments 1. Open the Employees table. 2. Switch to the Design View. 3. Click within the Phone field. Notice its data type is just text. 4. In the Field Properties area, click in the Input Mask Displays the phone field properties. line. 5. Click the Build button. Opens the Input Mask Wizard. 6. Click the Phone Number mask. 7. Click in the Try It Line to see how the mask would Type a few letters to see how it reacts. appear to data entry users. 8. Click Next. 9. Click Next to accept the underscore character as the placeholder displayed to the users. 10. Click the With the symbols in the mask option. Storing the literal characters make it easier to read the phone number but it also takes up more room within the database file. 11. Click Next. 12. Click Finish. Note the syntax used for the mask. 13. Save the table. 14. Click the Datasheet View. Notice how the phone numbers are now stored. NOTE! note Setting the InputMask property to the word "Password" creates a password-entry control. Any character typed in the control is stored as the character but is displayed as an asterisk (*). You use the Password input mask to prevent displaying the typed characters on the screen. 24

26 CREATING A CUSTOM INPUT MASK When you create a custom input mask, you need to use special characters to represent what type of data, such as a number or character, you want to display. When you type data in a field for which you've defined an input mask, the data is always entered in Overtype mode. If you use the BACKSPACE key to delete a character, the character is replaced by a blank space You can define an input mask by using the following characters. Character Description Digit (0 to 9, entry required, plus [+] and minus [-] signs not allowed) 9 Digit or space (entry not required, plus and minus signs not allowed) Digit or space (entry not required; spaces are displayed as blanks while in Edit mode, but # blanks are removed when data is saved; plus and minus signs allowed) L Letter (A to Z, entry required)? Letter (A to Z, entry optional) A a & C Letter or digit (entry required) Letter or digit (entry optional) Any character or a space (entry required) Any character or a space (entry optional)., : ; - / Decimal placeholder and thousand, date, and time separators. < Causes all characters to be converted to lowercase. > Causes all characters to be converted to uppercase. Causes the input mask to display from right to left, rather than from left to right. You can! include the exclamation point anywhere in the input mask. Causes the character that follows to be displayed as the literal character (for example, \A is \ displayed as just A). Input mask Sample values The following table shows some useful input masks and the type of values you can enter in them. (000) (206) (999) (206) ( ) (000) AAA-AAAA (206) 555-TELE # or 2000 >L????L?000L0 GREENGR339M3 >L0L 0L0 MAY R 452B7 T2F 8M or >L<?????????????? Maria SSN SSN >LL DB

27 Creating an Input Mask from Scratch 1. Open the table in Design View. 2. Select the appropriate field. 3. In the Field Properties area, click in the Input Mask line. 4. Type the appropriate syntax for each section of the mask. Separate the sections with a semi-colon. Instructions Comments 1. In the Employee tables Datasheet view, click within the first record s E ID field. 2. Type in the E ID field. Accepts any letter or number combination. 3. Press Tab. The revision is allowed. 4. Click Undo to undo the ID change. The original order number is restored. 5. Switch to the Design View. E ID field is the first field. 6. In the Field Properties area, click in the Input Mask line. 7. Press F1. Context-sensitive help on the Input Masks will display. 8. Close the Help screen. 9. Type >LLL ;1;X in the Input Mask line. The >LLL segment requires 3 upper case letters then a dash and the employee number. 10. Save the table. 11. Switch to the Datasheet View. 12. Add a new record. Note the input mask displays X s as placeholders. 13. Type 00. Will not accept numbers. 14. Type BJC. Will not accept a partial set of information. 15. Type BJC Press Tab to move to the next field. Accepts the data set. 17. Press Esc to cancel the record.? : How could you change the mask to automatically include BJC without typing it? 26

28 DEFINING VALIDATION RULES Validation rules allow you to restrict or control the data that can be entered into a field. Access will verify that the data entered into the field is valid as the user leaves the record. If the data entered does not comply with the rule, a message will appear and the data cannot be saved. When determining a refill quantity for a prescription, you might develop a validation rule that ensures that the quantity entered for the refill does not exceed the original quantity. CREATING VALIDATION RULES IN FIELD PROPERTIES Validation rules are created in the Design View s Field Properties section for a selected field. You can use standard operators such as >,<,=, and, or, etc. Validation rules can be entered into the Validation Rules Property or you can use the Expression Builder if you need to add formulas within the rule. Creating a Validation Rule by Typing 1. Open the table in Design View. 2. Click in the desired field. 3. In the Field Properties area, click in the Validation Rule line. 4. Type the rule you want use. (For example: >100 And <1000 or F OR M ) 5. Save the table. Instructions Comments 1. Open the Employees table. 2. Switch to the Design View. 3. Select the Gender field. Notice it already has data. 4. Under the Field Properties, click within the Type the rule in the cell. Validation Rule row. 5. Type F Or M Don t forget to place quotes around the text. 6. Switch to Datasheet View and save the changes. 7. Click Yes to test the existing data. Allows you to test to see if the existing data fits the new rule. 8. Click Yes to continue to test and keep the rule. 9. Click within the first records Gender field. 10. Type Female and press TAB. Access displays a message that the value is prohibited because of the validation rule. 11. Retype it as F and press TAB. Accepts the data. 12. Close the table. 27

29 UNDERSTANDING THE STRUCTURE OF THE EXPRESSION BUILDER You can use the Expression Builder to create a validation rule for a field. The Expression Builder is also used to help build formulas, which are called expressions in Access. The Expression Builder allows you to write expressions in forms and reports, tables, and in queries. It builds a list of fields and controls in your database and displays the built-in functions. You can create an expression by typing into the Expression box or you can select from the list of existing expressions. Examples of prebuilt functions include page numbers and the current date. The Expression Builder contains the following elements: The Expression Box Operator buttons Expression elements Folders Categories Values and Functions Expression Box Folders Values and functions Definition of the selected value Categories 28

30 Creating a Validation Rule 1. Open the table in Design View. 2. Click in the desired field. 3. In the Field Properties area, click in the Validation Rule line. 4. Click the Build button. 5. Enter the appropriate validation expression in the Expression Builder. Click to see a list of built-in functions 6. Click OK. 7. Save the table. EXPLAINING INVALID DATA The default message that appears when a user enters invalid data can be confusing. You may want to consider replacing this message with one that explains to the user what type of data is valid for the field. Here s an example of an error message generated by Access: 29

31 Instructions Comments 1. Open the Lunch Orders table. You will create a validation rule that ensures that the order date entered today or in the future. 2. Switch to the Design View. 3. Click in the OrderDate field. 4. In the Field Properties area, click in the Validation The Build button will appear. Rule line. 5. Click the Build button. The Expression Builder window will open. 6. In the Expression Box, type >=. 7. Double-click on the Functions folder in the first The Functions folder will expand. column of the Expression Elements area. 8. Select the Built-In Functions folder. A list of function categories will appear in the middle column. 9. Select the Date/Time category. A list of date/time functions will appear in the third section. 10. Double-click on the Now function. The Now function returns the current date and time. 11. Click OK. The Expression Builder will close. 12. Save the table. 13. Click Yes to perform the data integrity check. 14. Switch to Datasheet View. 15. Create a new record but use a date in the past. 16. Press Tab to complete the record. A message will appear informing you that the entry into the OrderDate field is not valid. 17. Click OK. The message closes. 18. Press ESC twice to cancel the new record. 30

32 Adding Explanatory Text to a Validation Rule Message 1. Open the table in Design View. 2. Click in the desired field. 3. In the Field Properties area, click in the Validation Text line. 4. Enter meaningful text for the error. 5. Save the table. Instructions Comments 1. Switch to the Design View. 2. Select the Order Date field. 3. In the Field properties area, click in the Validation Text line. 4. Type Please enter an order date today or in the future. This message will appear if the data entered is incorrect. 5. Save the table. 6. Switch to the Datasheet View. 7. Create a new record but use a date in the past. 8. Press Tab to complete the record. The custom error message with appear. 9. Click OK to close the message. 10. Change the Order Date to a future date. 11. Press Tab to complete the record. The validation rule is satisfied so the record is saved. 12. Close the table. 13. Close the database. 31

33 CONTROLLING DATA ENTRY: LOOKUPS When you provide users a list of choices for a field entry, you eliminate the possibility that incorrect data can be entered. In Access this can be accomplished by developing a lookup table. DEFINING A LOOKUP: ENTERING YOUR OWN LOOKUP VALUES The lookup list can either be built into the field properties as a static list or the list can provide current data from a table. When your list is static and rarely changes, adding the list to the field is appropriate. Storing the Lookup within the Table 1. Open the table in Design View. 2. Click in the desired field. 3. Change the field type to Lookup Wizard. 4. Click the I will type in the values that I want. option. 5. Click Next. 6. Type the number of columns you want in your lookup list. 7. Click in the first row in Col1. 8. Type the information you want in the list. 9. Press Tab to add additional items in the list. Repeat as needed. 32

34 10. Click Next. 11. If you are listing more than one column, specify which column stores the identifier. 12. Click Next. 13. Type a label for the column. This will show in the datasheet view. 14. Click Finish. 15. Save the table. 33

35 Instructions Comments 1. Open the Employees table. 2. Switch to the Design View. 3. Add a new text field named HSO. In this example, you will create and attach a list of vendors to the Inventory table. 4. Change the data type to Lookup Wizard. The Wizard will launch. 5. Select the I will type in the values I want option. Use this option when your list is static. 6. Click Next. 7. Enter a 1 for the number of columns. 8. Press Tab. The Wizard will expand the number of columns displayed. 9. Enter the following information in the columns using Expand the column to view all the text entered. TAB after each one: SLCH BJH MBMC CH BJHWC ALTON BOONE PROGRESS WEST 10. Click Next. 11. Accept HSO as the name of the field. 12. Click Finish. 13. Save the table. 14. Switch to the Datasheet View. 15. In the first record, click in the HSO field. Note a drop-down list appears. 16. From the drop-down list, select BJH. 17. Close the table. 34

36 DEFINING A LOOKUP: USING A CURRENT TABLE S VALUES When your data is subject to change, you may want to consider keeping your lookup information in its own table. The table is easier to find and edit than the lookup stored within the field. The table must exist before you can connect it. In essence, this action will create a relationship between the two tables. Pointing the Lookup to an Existing Table 1. Open the table in Design View. 2. Click in the desired field. 3. Change the field type to Lookup Wizard. 4. Click the I want the lookup column to lookup option. 5. Click Next. 6. Select the appropriate table. 7. Click Next. 8. Add the appropriate fields from the Available Fields list to the Selected Fields list using the arrow button. 9. Click Next. 35

37 10. Adjust the width of the column to display the data, if necessary. 11. Turn on or off the viewing of the key column, as desired. Double-click on the column border to auto-fit the column to the data. 12. Click Next. 13. Enter a label for your column. 14. Click Finish. 15. Save the table. DELETING THE RELATIONSHIP TO BUILD A LOOKUP If the field that you want to create a lookup for is in a table that is joined to another table, you will need to delete the relationship, then you can create the lookup. You can break the relationship in the Relationship window. Deleting a Relationship between Two Tables 1. Click the Database tools tab. 2. Under the Relationships group, select Relationships. 3. If no tables are displayed, click Show Table command and use the CTRL key to select the tables you want to display. 4. Click OK. 5. Right-click on the table join you want to delete. 6. Select Delete from the shortcut menu. 7. Click Close. 36

38 Instructions Comments 1. Open the Lunch Orders table. 2. In the first record, click the Employee field. Note the data is simply a number. 3. Switch to Design View. 4. Click in the Employee field. 5. Change the data type to Lookup Wizard. Opens the Lookup Wizard. 6. Accept the option to look up the values in a table or query. This option allows you to either enter the list now or use an existing field in a table as the list source. 7. Click Next. 8. Select the Employees table. Choose from a list of all available tables. 9. Click Next. 10. Add the Employee Last Name field. 11. Click the Selection Arrow. Moves the field to the selected field list. 12. Add the Employee First Name field. 13. Click the Selection Arrow. Moves the field to the selected field list. 14. Sort by Employee Last Name. 15. Click Next. 16. Adjust how wide you want to display the column and accept the default option to hide the key column. 17. Click Next. 18. Select Employee Last Name. Choose which field you want stored in the table. 19. Accept the Employee Last Name and click Finish. 20. Click Yes to save the table. 21. Switch to Datasheet View. 22. In the first record, click the Employee Name drop Note the names are sorted alphabetically. down list. 23. Select an Employee. 24. Close the table. 25. Close the database. 37

39 PROPERTY SHEETS In Access, use properties to determine the characteristics of tables, queries, fields, forms, and reports. You can view properties in a separate display called a Property Sheet. WHAT IS A PROPERTY SHEET? The Property Sheet is a tabbed window that displays on the right side of the Access display. It contains five tabs; Format, Data, Event, Other, and All. The Property Sheet changes depending on the Access object that is displayed. If a form or report is displayed then Access allows you to choose to view the properties for the entire object or the property of a selected element within the object. Change the object selected by clicking on the drop down list. FORMAT SHEET TABS The Format tab contains all of the commands related to the formatting and design of the object. The Data tab contains all of the commands related to where the data on the form is being pulled from and how a user can interact with that data. The Event tab contains all the commands related to running macros. The Other tab contains all of the commands that don t fit on the Format, Data, or Event tabs such as the Menu Bar display and Printing information. Viewing a Property Sheet for Tables and Queries 1. Open the Access object. 2. Click the Home tab. 3. Within the View group, click the View drop-down list. 4. Choose Design View. 5. Choose the Query, Table, Form or Report Design tab. 6. For Queries and Tables within the Show/Hide group, click Property Sheet. 7. For Forms and Reports, within the Tools group, click Property Sheet. TIME SAVER Use the keyboard shortcut F4 to open the Property Sheet quickly. 38

40 WHAT IS AN EXPRESSION? USING EXPRESSIONS IN OBJECTS Expressions are a fundamental part of many Microsoft Access operations. An expression is a combination of symbols, identifiers, operators, and values that produces a result. In Access, the word expression is synonymous with formula. Sometimes you need information that is not stored in a field in your database. For example, you might need to calculate the total due from a patient for multiple services or calculate the quantity of a particular drug dispensed within a 24-hour period. To accomplish these tasks, you use expressions. New Field Name Existing field COST W/TAX:[COST]*1.06 Operator Example of an expression located in an unbound text box. RULES WHEN USING EXPRESSIONS You can calculate in a query, a form, or a report object. Custom calculations can be created referencing particular table and field names but there are a few rules to remember: Table and field names must be referred to exactly but case is not considered. Table and field names must be enclosed by brackets. Table and field names must be separated by exclamation point. TIME SAVER Field names in formulas must be spelled correctly but are not case sensitive. 39

41 USING EXPRESSIONS IN QUERIES Expressions are commonly used in queries. If you created a field in a table to hold a total due for a patient visit, you would be forced to manually calculate that total in an object. Changes to the fees for services would require you to recalculate that total. Instead, you can create a calculation in a query to total the fees. You can then use that calculation in the report invoice generated for the patient at the end of the visit. Access also includes the ability to use common functions to quickly find high level information, such as an average quantity for a drug dispensed by the pharmacy. These are called Aggregate functions. USING AGGREGATE FUNCTIONS Access includes the ability to group and summarize records within a query. By grouping the records, you can choose from a variety of built-in calculations, including sum, average, and count. Turn on the Totals feature and a Total criteria line will be added to the query design grid. Finding a Count of Items 1. Create a new query in Design View. 2. Add the appropriate tables to the query. 3. Add the appropriate fields to the query. 4. Under the Show/Hide group, click the Totals button. 5. Click in the Total line for the field you want to summarize. 6. Select a function from the drop-down list. 7. Run the query. 40

42 NOTE! To get the best results with aggregate functions, use the fewest number of fields possible. note Instructions Comments 1. Open the Gourmet Lunch for Expressions database. 2. Create a new query in Design View. 3. Add the Employees, Lunch Orders, and Entrees tables to Note that the tables are already related. the query. 4. Add the Employee Last Name field from the Employees table to the query. 5. Add the Main field from the Lunch Orders table to the query. 6. Sort the Employee Last Name field in Ascending order. 7. Click the Totals button. A Total line is added to the query grid. 8. In the Total line for the Main field, choose Count from the drop-down menu. 9. Run the query. For each product in the Inventory table, you will see the number of customers who ordered it. 10. Resize the columns to view the entire set of data. 11. Save the table as Orders by Employee. 12. Close the query. Q?: What is another way to get a count of how many orders per employee? CREATING CUSTOM CALCULATIONS When you create a custom expression in a query, you create a field that can be used in forms or reports. This allows you to extend your data without storing manually calculated information in a table. In the query grid, the calculated field consists of three parts: the name you'll give to the calculated field, a colon, and then the expression that generates the result of your calculated field. New Field Name Existing Field (in brackets) COST W/TAX:[COST]*1.06 Operator 41

43 Creating a Custom Calculation in a Query 1. Create a new query in Design View. 2. Click in a blank field cell in the query grid. 3. Type a name for the expression, followed by the colon (:). Type the expression for the calculation, referring to the rules outlined in the Using Expressions section. 4. Right click on the field cell. 5. Choose Properties from the short-cut menu or press F4. 6. Select an appropriate format. 7. Run the query. Instructions Comments 1. Open the Orders by Dept query. Note that there are many items that have quantities ordered greater than one. 2. Click in the first blank Field cell. 3. Type Cost w/tax:[cost]*1.06 Be sure to spell the fields correctly and use the bracket symbol not the brace. 4. Run the query. Note that the Cost w/tax field has a general number format. 5. Switch to the Design View. 6. Right-click on the Cost w/tax field. A short-cut menu will appear. 7. Select Properties. 8. Choose Currency from the Format drop-down The Format property is found on the General tab. menu. 9. Run the query. Note that the Extended Price field has a general number format. 10. Save the query. 11. Close the query. How Can I get a Total for the ID department? 42

44 USING EXPRESSIONS IN FORMS You can also add an expression directly to a form. For example, you might use a calculation to total fees from multiple fields. An unbound text box is used to hold the expression. The expression is entered into the text box s Property Sheet under the Control Source. Expressions in forms look for like an Excel formula because they start with an equal sign. CALCULATING IN A FORM BY ADDING A TEXT BOX You can add text boxes to any form or report in either Design or Layout View. When a text box is added, it will not only create a text box but also a label box. The text box will display the word unbound in the box. This means that this text box is not bound to any particular field within the database. Unbound text box with label Text boxes can be bound to a field or contain an expression that includes reference to a field. Expressions in forms are added within the Control Source of an unbound text box. You can use the Expression Builder to create the expression and then it will display in the Property Control Source box. Expression can be typed in within the Control Source line. Choose the value s format Adding an Expression to a Form 1. Open the form in Design View. 2. Click the Form Design Tools Design tab. 3. Under the Controls group, click the Text box button. 4. Click and drag on the form where you want the text box to appear. 5. Select the unbound object. 6. Click the Form Design Tools Design tab. 7. Under the Tools group, select the Property Sheet. 8. On the All tab, type a name for the object in the Name line. 9. In the Control Source line, type the expression or use the Build button to open the Expression Builder. 10. In the Format line, choose an appropriate format using the drop-down list. 43

45 11. Select the label. 12. Click the All tab. 13. Under Caption, type a name for the label. 14. Press Enter. 15. View the form to test your expression. TIME SAVER You can also right-click on an unbound object to access the Property Sheet. ADJUSTING THE TEXT BOX AND LABEL BOX LOCATION AND SIZE The text box and corresponding label box are both attached by default. You can adjust the individual box size by using the selected box s size handles. If you need to move both boxes to a new location, simply click and drag one of the boxes and the other will also move. Use the larger black handle on either the label or text box to move them individually. The larger square handle is to move the label only Instructions Comments 1. Open the Gourmet CO Orders form. Note that the form contains a subform with order details. 2. Switch to Design View. 3. Click the Form Design Tools Design tab. 4. Under the Controls group, click the Text Box tool. The mouse pointer will change to include Text Box icon. 5. Click below the Cost field. Use the crosshair located at the top left of the mouse pointer to help you position the field. An unbound control will be added. 6. Move the unbound control to align it with the Cost field, if necessary. 7. Right-click on the unbound object. 8. Choose Properties from the short-cut menu. 9. Click in the Control Source line. The Control Source property can be found on the All or the Data tabs. 10. Type = [cost]* Click in the Format line. 12. Select Currency from the drop-down list. You will need to scroll down. 13. Close the Properties window. 14. Switch to the Form View. Note the calculation. 15. Save the form. 16. Close the form. 44

46 USING EXPRESSIONS IN REPORTS You can use expressions from queries in reports or create expressions directly within the report. Examples of common report expressions include a grand total for an invoice or claim, merged text fields storing name and address information, page numbers and date/time information. CREATING AN EXPRESSION IN A REPORT In order to place an expression in a report you will need to be in Design view. Just like with forms, you can type an expression in the Property Sheet of an unbound object within the Control Source. Example of an expression located in the property sheet. Adding an Expression to a Report 1. Open the report in Design View. 2. Click the Report Design Tools Design tab. 3. Under the Controls group, select the Text Box tool. Example of an expression located in a report s unbound text box. 4. Using the Text Box tool, add an unbound control to the report in the section in which you want the expression to appear. 5. Right-click on the unbound object. 6. Choose Properties from the short-cut menu. 7. On the All tab, type a name for the object in the Name line. 8. In the Control Source line, type the expression or use the Build button to open the Expression Builder. 9. In the Format line, choose an appropriate format using the drop-down list. 10. Close the Properties window. 11. Update the label object with descriptive text. 12. View the report to test your expression. TIME SAVER You can use the keyboard combination Shift + F2 to open a Zoom window. This window will allow you to enlarge the font size, making it easier for you to create and edit the expression. 45

47 Instructions Comments 1. Open the Orders by Dept report. 2. Switch to the Design View. Notice how the report is divided into sections. 3. Click the Report Design Tools Design tab. 4. Under the Control group, click the Text Box tool. 5. Add the unbound control box to the Dept Footer section below the Summary for text box. 6. Under the Tools group, click the Property Sheet. The text box Property Sheet opens on the right. 7. Under the Property Sheet s Data tab, click in the Control Source line. 8. Press Shift + F2 on the keyboard. The Zoom window will open. 9. Change the Font command button. Allows you to change the font size so it s easier to see. 10. Change the font size to 12. This affects text within the Zoom window only. 11. Click OK. 12. Type=Sum([Cost]*1.06. This formula adds together all the field values in the group and then multiplies them by Press ENTER. 14. Select the label and type Sum with Tax. 15. Press ENTER. 16. Click OK. 17. Click in the Format line. 18. Select Currency from the drop-down list. Formats the value to display a dollar sign and two decimal places. 19. Close the Property Sheet. 20. Preview the report. 21. Save the report. 46

48 CONCATENATING TEXT The word concatenate means to combine. Concatenating text is handy when you need to display fields together in a report such as a First and Last Name. Access uses the plus sign (+) as the concatenation symbol. All literal characters, such as spaces and punctuation, must be enclosed in quotation marks. Concatenation symbol Literal characters are in quotes Merging Text Fields in a Report 1. Open the report. 2. Right-click on the report and select Design View. 3. Click the Report Design Tools Design tab. 4. Under the Controls group, select the Text Box tool. 5. Using the Text Box tool, add an unbound control to the report in the section in which you want the expression to appear. 6. Right-click on the unbound object. 7. Choose Properties from the short-cut menu. 8. On the All tab, type a name for the object in the Name line. 9. In the Control Source line, type the expression or use the Build button to open the Expression Builder. 10. Type the next text or field name. 11. Under the Views group, click the Report View or Print Preview button. 47

49 Instructions Comments 1. Open the Orders by Dept report. Note that the report opens in Print Preview. 2. Switch to Design View. You can right-click on the open report and choose Design View. 3. Under the Detail Section, delete the Employee Last Name and Employee First Name fields. 4. Click the Report Design Tools Design tab. 5. Under the Controls group, select the Text box tool. 6. Add the unbound control within the Detail section lined up with Employee First Name field in the Page Header. Make it big enough to accommodate both first and last names. 7. Type =[Employee Last Name]+, +[ Employee Don t forget the brackets! First Name]. 8. Switch to Report View. Displays a Print Preview of the report. 9. Switch to Design View. 10. Select the text label and press DELETE. Click the larger selection handle to delete just the label. 11. Under the Page Header section, delete the Employee First Name text box label. 12. Select the Employee Last Name text box label and remove the word Last. Select the text box and then double-click on Last to quickly select it. 13. Press ENTER. Accepts the change. 14. Select the concatenated text box, and In some cases spaces needed to be added when add a space after the comma. combining fields. Access doesn t automatically add them. 15. Right-click on the report and select Design View. Offers a quick way to switch to Design view. 16. Make adjustments to the size and position of the bound control, if necessary. 17. Switch to Report View. 18. Close the report and save the changes. 48

50 QUERY OPTIONS OTHER TYPES OF QUERIES Most queries used in Access are Select queries; this type of query extracts information from the table or tables used within the query based on the criteria set. Although you can use a Select query to change data in a table, no other action takes place. There are other types of queries as well, including a Make Table query, an Update query, an Append query, Delete query and Parameter query. These queries take action on your data. To create these special queries you need to start with a Select query. When the select query is in Design View, then the Query Tools tab appears which contains the Query Type group. Run command is important tool with specific queries. Updates values Deletes specific data from a table Pushes data to a new table. Pushes data to an existing table. UPDATE QUERIES An Update query is used to make changes in the data of a table. An Update query might be used if fees are increased (or reduced) by 5% across a group of services. Rather than calculate the new fee manually and revise the records, an Update query can calculate the entire field s data within a table. In order to run an Update query, you must use the Run button on the toolbar. No action takes place when you use the View button. Running an Update Query 1. Create a new query in Design View. 2. Add the appropriate tables to the query. 3. Add the desired fields to the query. The field being updated must be added to the query. 4. Add criteria to the query specifying which records are affected. 5. Run the query to verify you are returning the records you want to affect. 6. Switch to the Design View. 7. Click the Query Tools Design tab. 8. Select Update Query. An Update To line will be added to the query grid. 49

51 9. Enter an expression in the field you want updated. 10. Click the Run button. 11. Click OK to confirm the action. 12. Close the query without saving. NOTE! note Saving an update query can be dangerous! The query will run when someone double-clicks on it, which will cause the update to occur again. Instructions Comments 1. Open the Entrees table. Notice the prices of the wraps. 2. Close the table. 3. Create a new query in Design View. 4. Add the Entrees table to the query. 5. Add the SW and Cost fields. 6. In the Main criteria line, type *wrap. Displays only descriptions that end in wrap. 7. Run the query. There are 4 items with the SW field equal to Wrap. Note the prices of each. 8. Switch to Design View. 9. Click the drop-down arrow to the right of the A list of other query types will display. Query Type tool. 10. Select Update Query. An Update To line will be added. 11. In the Update To line for the Cost field, type This will increase the price of each wrap by $1.50. [Cost] Click the Run button. 13. Click Yes to confirm the action. 14. Close the query without saving. If you saved and reran the query the prices would increase again. 15. Open the Entrees table. Note the new prices. 16. Close the table. 17. Close the database. OH NO! - Why is the Cost increase more than just $1.50? 50

52 MAKE TABLE QUERIES A Make Table query is often used to segment data into separate tables. For instance, you might use a Make Table query to archive old patient visit records in order to improve the performance of your Visits table. Then you can delete the old records from the visits table and be assured that they are stored elsewhere in the database. Running a Make Table Query 1. Create a new query in Design View. 2. Add the appropriate tables to the query. 3. Add all fields you want in the new table. 4. Add criteria to the query specifying which records will be added to the new table. 5. Run the query to verify you are returning the records in the new table. 6. Switch to Design View. 7. Click the Query Tools Design tab. 8. Run the query. 9. Type a name for the new table. 10. If you want to the table to be stored in a new database, select the database. 11. Click OK. 12. Under the Results group, select Run. 13. Click Yes to confirm the action. 14. Close the query without saving. 51

53 Instructions Comments 1. Open the Employees table. Note how many inactive employees display. 2. Close the table. 3. Create a new query in Design View. 4. Add the Employees table to the query. 5. Add all the fields individually to the query. 6. In the Inactive criteria line, type Yes. 7. Run the query. How many inactive employees are there? 8. Switch to the Design View. 9. Click the Query Tools Design tab. 10. Under the Query Type group, select Make Table query. 11. Type Inactive Employees as the table name. 12. Under the Results group, click Run. Changing the View will not run a Make Table query. 13. Click OK. Closes the Make Table dialog box. 14. Click Yes. Confirms the action. 15. Click Yes. Confirms pasting rows into the new table. 16. Close the query without saving. 17. Open the Inactive Employees table. How many records display in the new table. 18. Close the table. 52

54 APPEND QUERIES An Append query adds records to an existing table. You might receive a report on new patients from another department and would like to add these patients automatically to the existing Patients table. You must first make sure that all of the required data is present in the records you wish to append. Running an Append Query 1. Create a new query in Design View. 2. Add the appropriate tables to the query. 3. Add all fields you need to append. 4. Add criteria to the query specifying which records will be added to the existing table. 5. Run the query to verify which records will append. 6. Switch to Design View. 7. Click the Query Tools Design tab. 8. Under Query Type, click Append. 9. Click the Table Name drop down list and select the table you want to append. 10. If you want to the table to be stored in another database, select the database. 11. Click OK. 12. Under the Results group, select Run. 13. Click Yes to confirm the action. 14. Close the query without saving. 53

55 Instructions Comments 1. Open the Employees table. 2. Select two records and mark them Inactive. Click in the Yes/No checkbox. 3. Close the table. 4. Create a new query in Design View. 5. Add the Employee table to the query. 6. Add all the fields individually to the query. To save time, select all the fields first and then drag and drop them into the design grid. 7. In the InActive criteria line, type Yes. Yes or True means checked. 8. Run the query. Check the results. 9. Switch to the Design View. 10. Under the Query Type group, select Append The Append window will open. Query. 11. Select Inactive Employees from the Table Name drop-down list. 12. Click OK. 13. Under the Results group, select Run. Appends the table with the new data. 14. Click OK to confirm the append action. 15. Close the query without saving. 16. Open the Inactive Employees table. Note how many employees are now listed. 17. Close the database. 54

56 DELETE QUERIES When you need to remove a small amount of records from a database it s safest to simply open the table or form that displays the records and use the Delete command. But if you need to delete large amounts of data quickly, use a Delete query. Delete queries remove all the data in each field, including the key value that makes a record unique. If you wish to use the Delete query to remove records from multiple tables rather than just a single database table, you will need to ensure that: You have relationships defined between related tables in your Microsoft Access database You have enforced the Referential Integrity for the relationships between your chosen tables. You have opted to Cascade Delete Related Records for the relationship type If you are using the Delete query to remove records from multiple tables that are related in a One-To-Many relationship without having defined the option to Cascade Delete Related records, Microsoft Access will only delete the records from one table at a time. If this is the case, you must delete the records from the many side of the relationship first (to ensure against orphaning records), and then delete the records from the one side of the relationship. NOTE! note Make sure that you have a backup of your database before you delete your data. Running a Delete Query 1. Create a new query in Design View. 2. Add the appropriate tables to the query. 3. Add all fields you want to delete. 4. Add criteria to the query specifying which records will be deleted. 5. Run the query to verify which records will be deleted. 6. Switch to Design View. 7. Click the Query Tools Design tab. Under Query Type group, click Delete. 8. Click Yes to approve the delete. 9. Close the query without saving the changes. 55

57 Instructions Comments 1. Create a new query in Design View. 2. Add the Employees table to the query. 3. Add all the fields individually to the query. 4. In the Inactive Employee criteria line, type Yes. Yes or True means checked. 5. Run the query. The results display only the Inactive Employees. 6. Switch to the Design View. 7. Under the Query Tools Query Type tab, select the Delete Query. 8. Click Yes. Approves the record deletion. 9. Close the Query and don t save it. 56

58 PARAMETER QUERIES Sometimes we need to use the same basic query on a monthly basis but one variable needs to be adjusted each time. Instead of recreating a new query each time or changing the design of an existing one, you can build a Parameter query. This useful query asks for your input to set criteria before the query actually runs. Instead of typing a value or expression into the criteria cell in Design view like a normal query, you type your question in the criteria cell and enclose it in square brackets ([ ]). Adding brackets to the value or expression will set it as a parameter message. The text you type will appear as a prompt on a dialog box, so you might want it to be in the form of a question to the user. In this example the user will be prompted to type the name of a department when they run the query. The text the user types will be used as the criteria for that particular field. The dialog box looks like this When the message appears, type in your criteria. Creating and Running a Parameter Query 1. Create a Select Query in Design View. 2. Add any non-variable criteria to the appropriate fields in the Criteria row. 3. Locate the field(s) you would like to make variable criteria. 4. Type the phrase you would like to appear in the prompt that will pop up every time you run your query. Enclose the phrase in brackets []. 5. Under the Results group, click Run. 6. A dialog box will appear with the prompt you specified. 7. Enter your criteria and click OK. 57

59 TIPS FOR WRITING PARAMETER QUERIES Ideally, the prompt you create for your query should make it clear what type of information the search term should be, and what format it should be entered in. For example, to guarantee that people enter a search for a date in the format we use in our database, we could write the following in the Criteria: row of the Date field: [What date? (mm/dd/yy)]. The simplest parameter query will give you an exact match criteria, meaning that the query will search for the exact text you enter in the prompt. However, you can turn any type of criteria into variable criteria. Simply type your prompt text in brackets in the part of the criteria where you would normally put a search term. For example, in a normal query, we could find orders that were placed between two dates by using the criteria Between x AND y, and replacing the x and y with the first and second dates, respectively. To turn this into a parameter criteria, we would simply replace the x and y with the text we want to appear in the prompt. Our variable criteria might look like this: Between [Enter the start date:] AND [Enter the ending date:]. These prompts would appear: Instructions Comments 1. Open the Orders by Date query. 2. Within the Order Date field criteria line, type [What Date?] 3. Press Enter. 4. Switch to Datasheet View. Runs the query with the parameters. 5. Type 5/15/2013 and click OK. 6. Switch to Design View. 7. Within the Order Date field criteria line, remove the current parameter. Adding the Between and And operators creates multiple parameter criteria boxes. Replace with the following: Between [Enter Start Date:] and [Enter End Date:] 8. Press Enter. 9. Switch to Datasheet View. 10. Enter a Start Date and click OK. 11. Enter an End Date and click OK. 58

Use Find & Replace Commands under Home tab to search and replace data.

Use Find & Replace Commands under Home tab to search and replace data. Microsoft Access 2: Managing Data in Tables and Creating Relationships You have created tables in an Access database. Data in Access tables can be added, deleted, and updated to be current (practiced in

More information

Microsoft Access Basics

Microsoft Access Basics Microsoft Access Basics 2006 ipic Development Group, LLC Authored by James D Ballotti Microsoft, Access, Excel, Word, and Office are registered trademarks of the Microsoft Corporation Version 1 - Revision

More information

Planning and Creating a Custom Database

Planning and Creating a Custom Database Planning and Creating a Custom Database Introduction The Microsoft Office Access 00 database wizards make creating databases easy, but you may need to create a database that does not fit any of the predefined

More information

Microsoft Access 2010 Overview of Basics

Microsoft Access 2010 Overview of Basics Opening Screen Access 2010 launches with a window allowing you to: create a new database from a template; create a new template from scratch; or open an existing database. Open existing Templates Create

More information

Access I 2010. Tables, Queries, Forms, Reports. Lourdes Day, Technology Specialist, FDLRS Sunrise

Access I 2010. Tables, Queries, Forms, Reports. Lourdes Day, Technology Specialist, FDLRS Sunrise Access I 2010 Tables, Queries, Forms, Reports Lourdes Day, Technology Specialist, FDLRS Sunrise Objectives Participants will 1. create and edit a table 2. create queries with criteria 3. create and edit

More information

Access 2007. Creating Databases - Fundamentals

Access 2007. Creating Databases - Fundamentals Access 2007 Creating Databases - Fundamentals Contents Database Design Objectives of database design 1 Process of database design 1 Creating a New Database... 3 Tables... 4 Creating a table in design view

More information

Microsoft Access 2010 Part 1: Introduction to Access

Microsoft Access 2010 Part 1: Introduction to Access CALIFORNIA STATE UNIVERSITY, LOS ANGELES INFORMATION TECHNOLOGY SERVICES Microsoft Access 2010 Part 1: Introduction to Access Fall 2014, Version 1.2 Table of Contents Introduction...3 Starting Access...3

More information

Access Part 2 - Design

Access Part 2 - Design Access Part 2 - Design The Database Design Process It is important to remember that creating a database is an iterative process. After the database is created and you and others begin to use it there will

More information

User Services. Microsoft Access 2003 II. Use the new Microsoft

User Services. Microsoft Access 2003 II. Use the new Microsoft User Services July 2007 OBJECTIVES Develop Field Properties Import Data from an Excel Spreadsheet Create Relationships Create a Form with a Subform Create Action Queries Create Command Buttons Create a

More information

IN THIS PROJECT, YOU LEARN HOW TO

IN THIS PROJECT, YOU LEARN HOW TO UNIT 2 PROJECT 11 CREATING A CUSTOMIZED DATABASE IN THIS PROJECT, YOU LEARN HOW TO Examine a Database and Its Objects Create Tables and Set Field Properties in Design View Create Relationships Add and

More information

Access 2007 Creating Forms Table of Contents

Access 2007 Creating Forms Table of Contents Access 2007 Creating Forms Table of Contents CREATING FORMS IN ACCESS 2007... 3 UNDERSTAND LAYOUT VIEW AND DESIGN VIEW... 3 LAYOUT VIEW... 3 DESIGN VIEW... 3 UNDERSTAND CONTROLS... 4 BOUND CONTROL... 4

More information

Filter by Selection button. Displays records by degree to which they match the selected record. Click to view advanced filtering options

Filter by Selection button. Displays records by degree to which they match the selected record. Click to view advanced filtering options The Home Ribbon Sort Buttons: sort records into ascending or descending order by selected field Filter by Selection button. Displays records by degree to which they match the selected record. Display summary

More information

Microsoft Access 2010 handout

Microsoft Access 2010 handout Microsoft Access 2010 handout Access 2010 is a relational database program you can use to create and manage large quantities of data. You can use Access to manage anything from a home inventory to a giant

More information

Creating and Using Databases with Microsoft Access

Creating and Using Databases with Microsoft Access CHAPTER A Creating and Using Databases with Microsoft Access In this chapter, you will Use Access to explore a simple database Design and create a new database Create and use forms Create and use queries

More information

Lab Manual. Databases. Microsoft Access. Peeking into Computer Science Access Lab manual

Lab Manual. Databases. Microsoft Access. Peeking into Computer Science Access Lab manual Lab Manual Databases Microsoft Access 1 Table of Contents Lab 1: Introduction to Microsoft Access... 3 Getting started... 3 Tables... 3 Primary Keys... 6 Field Properties... 7 Validation Rules... 11 Input

More information

Microsoft Access 3: Understanding and Creating Queries

Microsoft Access 3: Understanding and Creating Queries Microsoft Access 3: Understanding and Creating Queries In Access Level 2, we learned how to perform basic data retrievals by using Search & Replace functions and Sort & Filter functions. For more complex

More information

Microsoft Access 2010: Basics & Database Fundamentals

Microsoft Access 2010: Basics & Database Fundamentals Microsoft Access 2010: Basics & Database Fundamentals This workshop assumes you are comfortable with a computer and have some knowledge of other Microsoft Office programs. Topics include database concepts,

More information

Introduction to Microsoft Access 2010

Introduction to Microsoft Access 2010 Introduction to Microsoft Access 2010 A database is a collection of information that is related. Access allows you to manage your information in one database file. Within Access there are four major objects:

More information

Introduction to Microsoft Office Access 2010

Introduction to Microsoft Office Access 2010 Introduction to Microsoft Office Access 2010 The Himmelfarb Health Sciences Library Questions? Ask us. Microsoft Office Access 2010 by Himmelfarb Health Sciences Library is licensed under a Creative Commons

More information

Introduction to Microsoft Access 2003

Introduction to Microsoft Access 2003 Introduction to Microsoft Access 2003 Zhi Liu School of Information Fall/2006 Introduction and Objectives Microsoft Access 2003 is a powerful, yet easy to learn, relational database application for Microsoft

More information

Microsoft Access 2007 Module 1

Microsoft Access 2007 Module 1 Microsoft Access 007 Module http://pds.hccfl.edu/pds Microsoft Access 007: Module August 007 007 Hillsborough Community College - Professional Development and Web Services Hillsborough Community College

More information

Intermediate Microsoft Access 2007

Intermediate Microsoft Access 2007 Intermediate Microsoft Access 2007 Using More Than One Table Often times a database will have more than one table. For example, in a Customer database, one table might contain information about each individual

More information

MS Access Lab 2. Topic: Tables

MS Access Lab 2. Topic: Tables MS Access Lab 2 Topic: Tables Summary Introduction: Tables, Start to build a new database Creating Tables: Datasheet View, Design View Working with Data: Sorting, Filtering Help on Tables Introduction

More information

Access Queries (Office 2003)

Access Queries (Office 2003) Access Queries (Office 2003) Technical Support Services Office of Information Technology, West Virginia University OIT Help Desk 293-4444 x 1 oit.wvu.edu/support/training/classmat/db/ Instructor: Kathy

More information

Introduction to Microsoft Access 2013

Introduction to Microsoft Access 2013 Introduction to Microsoft Access 2013 A database is a collection of information that is related. Access allows you to manage your information in one database file. Within Access there are four major objects:

More information

Table and field properties Tables and fields also have properties that you can set to control their characteristics or behavior.

Table and field properties Tables and fields also have properties that you can set to control their characteristics or behavior. Create a table When you create a database, you store your data in tables subject-based lists that contain rows and columns. For instance, you can create a Contacts table to store a list of names, addresses,

More information

Creating a Database in Access

Creating a Database in Access Creating a Database in Access Microsoft Access is a database application. A database is collection of records and files organized for a particular purpose. For example, you could use a database to store

More information

Lab 9 Access PreLab Copy the prelab folder, Lab09 PreLab9_Access_intro

Lab 9 Access PreLab Copy the prelab folder, Lab09 PreLab9_Access_intro Lab 9 Access PreLab Copy the prelab folder, Lab09 PreLab9_Access_intro, to your M: drive. To do the second part of the prelab, you will need to have available a database from that folder. Creating a new

More information

MS Access: Advanced Tables and Queries. Lesson Notes Author: Pamela Schmidt

MS Access: Advanced Tables and Queries. Lesson Notes Author: Pamela Schmidt Lesson Notes Author: Pamela Schmidt Tables Text Fields (Default) Text or combinations of text and numbers, as well as numbers that don't require calculations, such as phone numbers. or the length set by

More information

Simple Invoicing Desktop Database with MS Access 2013. c 2015 by David W. Gerbing School of Business Administration Portland State University

Simple Invoicing Desktop Database with MS Access 2013. c 2015 by David W. Gerbing School of Business Administration Portland State University Simple Invoicing Desktop Database with MS Access 2013 c 2015 by David W. Gerbing School of Business Administration Portland State University July 2, 2015 CONTENTS 1 Contents 1 Create a New Database 1 2

More information

Access 2007. Queries

Access 2007. Queries Access 2007 Queries WORKSHOP DESCRIPTION... 1 Overview 1 Prerequisites 1 Objectives 1 WHAT IS A QUERY?... 2 WHY USE QUERIES?... 2 TERMS TO KNOW... 2 Select Queries 2 Action Queries 2 Crosstab Queries

More information

Access 2010: Creating Queries Table of Contents INTRODUCTION TO QUERIES... 2 QUERY JOINS... 2 INNER JOINS... 3 OUTER JOINS...

Access 2010: Creating Queries Table of Contents INTRODUCTION TO QUERIES... 2 QUERY JOINS... 2 INNER JOINS... 3 OUTER JOINS... Access 2010: Creating Queries Table of Contents INTRODUCTION TO QUERIES... 2 QUERY JOINS... 2 INNER JOINS... 3 OUTER JOINS... 3 CHANGE A JOIN PROPERTY... 4 REMOVING A JOIN... 4 CREATE QUERIES... 4 THE

More information

Create a New Database in Access 2010

Create a New Database in Access 2010 Create a New Database in Access 2010 Table of Contents OVERVIEW... 1 CREATING A DATABASE... 1 ADDING TO A DATABASE... 2 CREATE A DATABASE BY USING A TEMPLATE... 2 CREATE A DATABASE WITHOUT USING A TEMPLATE...

More information

Creating Reports in Access 2010

Creating Reports in Access 2010 Creating Reports in Access 2010 Table of Contents INTRODUCTION TO REPORTS... 2 PARTS OF A REPORT... 3 UNDERSTAND CONTROLS... 3 CREATE A SIMPLE REPORT... 4 STEP 1: CHOOSE A RECORD SOURCE... 4 Different

More information

Access 2007. Using Access

Access 2007. Using Access Access 2007 Using Access 1 Contents Introduction to Microsoft Access 2007... 3 Microsoft Access 2007 features 3 Opening a database 4 Database objects 5 Opening objects 6 Working with objects 6 Saving in

More information

Microsoft Access 2003 Module 1

Microsoft Access 2003 Module 1 Microsoft Access 003 Module http://pds.hccfl.edu/pds Microsoft Access 003: Module June 005 006 Hillsborough Community College - Professional Development Services Hillsborough Community College - Professional

More information

MICROSOFT OFFICE ACCESS 2007 - LEVEL 2

MICROSOFT OFFICE ACCESS 2007 - LEVEL 2 MICROSOFT OFFICE 2007 MICROSOFT OFFICE ACCESS 2007 - LEVEL 2 Modifying Tables Setting Field Properties Using Operators in Queries Designing Advanced Queries Creating Action Queries Using Advanced Query

More information

A Basic introduction to Microsoft Access

A Basic introduction to Microsoft Access A Basic introduction to Microsoft Access By Ojango J.M.K Department of Animal Sciences, Egerton University, Njoro, Kenya and International Livestock Research Institute, Nairobi, Kenya Ms Access is a database

More information

What is a database? The parts of an Access database

What is a database? The parts of an Access database What is a database? Any database is a tool to organize and store pieces of information. A Rolodex is a database. So is a phone book. The main goals of a database designer are to: 1. Make sure the data

More information

Microsoft Using an Existing Database Amarillo College Revision Date: July 30, 2008

Microsoft Using an Existing Database Amarillo College Revision Date: July 30, 2008 Microsoft Amarillo College Revision Date: July 30, 2008 Table of Contents GENERAL INFORMATION... 1 TERMINOLOGY... 1 ADVANTAGES OF USING A DATABASE... 2 A DATABASE SHOULD CONTAIN:... 3 A DATABASE SHOULD

More information

Microsoft Access Part I (Database Design Basics) ShortCourse Handout

Microsoft Access Part I (Database Design Basics) ShortCourse Handout Microsoft Access Part I (Database Design Basics) ShortCourse Handout July 2004, Technology Support, Texas Tech University. ALL RIGHTS RESERVED. Members of Texas Tech University or Texas Tech Health Sciences

More information

Section DB DATABASE - Microsoft Access

Section DB DATABASE - Microsoft Access Section DB DATABASE - Microsoft Access About Access 2007 Access 2007 is part of Microsoft Office 2007. It is an important productivity tool for business. Microsoft Access provides an inexpensive yet powerful

More information

User Services. Intermediate Microsoft Access. Use the new Microsoft Access. Getting Help. Instructors OBJECTIVES. July 2009

User Services. Intermediate Microsoft Access. Use the new Microsoft Access. Getting Help. Instructors OBJECTIVES. July 2009 User Services July 2009 OBJECTIVES Develop Field Properties Import Data from an Excel Spreadsheet & MS Access database Create Relationships Create a Form with a Subform Create Action Queries Create Command

More information

European Computer Driving Licence

European Computer Driving Licence European Computer Driving Licence ECDL Syllabus 5.0 Module 5 Using Databases ECDL Syllabus 5 Courseware Module 5 Contents UNDERSTANDING DATABASES... 1 KEY CONCEPTS...1 DATABASE ORGANIZATION...1 RELATIONSHIPS...3

More information

Creating a Worksheet with Excel

Creating a Worksheet with Excel Creating a Worksheet with Excel Introduction Are you spending too much time number-crunching, rewriting financial reports, drawing charts, or searching for your calculator? Throw away your pencil, graph

More information

Microsoft Access 2010 Advanced Queries

Microsoft Access 2010 Advanced Queries Microsoft Access 2010 Advanced Queries Email: training@health.ufl.edu Web Page: http://training.health.ufl.edu Microsoft Access 2010: Advanced Queries 2.0 hours This workshop requires completion of "Access:

More information

Excel Database Management Microsoft Excel 2003

Excel Database Management Microsoft Excel 2003 Excel Database Management Microsoft Reference Guide University Technology Services Computer Training Copyright Notice Copyright 2003 EBook Publishing. All rights reserved. No part of this publication may

More information

Lesson 07: MS ACCESS - Handout. Introduction to database (30 mins)

Lesson 07: MS ACCESS - Handout. Introduction to database (30 mins) Lesson 07: MS ACCESS - Handout Handout Introduction to database (30 mins) Microsoft Access is a database application. A database is a collection of related information put together in database objects.

More information

Creating a Database using Access 2007

Creating a Database using Access 2007 Creating a Database using Access 2007 Starting Access 2007 Double click on the Access 2007 icon on the Windows desktop (see right), or click-on the Start button in the lower left corner of the screen,

More information

Access Database Design

Access Database Design Access Database Design Technical Support Services Office of Information Technology, West Virginia University OIT Help Desk -- 293-4444 x 1 http://oit.wvu.edu/support/training/classmat/db/ Instructors:

More information

Field Name Data Type Description Field Size Format

Field Name Data Type Description Field Size Format Data Dictionary: tblvendor (Sample) Field Name Data Type Field Size Format Default Value Input Mask VID Text Unique Vendor Identifier 10 >L????? VName Text Vendor Name 50 VAddress Text Vendor Address 50

More information

TheFinancialEdge. Fast! Guide

TheFinancialEdge. Fast! Guide TheFinancialEdge Fast! Guide 101811 2011 Blackbaud, Inc. This publication, or any part thereof, may not be reproduced or transmitted in any form or by any means, electronic, or mechanical, including photocopying,

More information

MICROSOFT ACCESS 2003 TUTORIAL

MICROSOFT ACCESS 2003 TUTORIAL MICROSOFT ACCESS 2003 TUTORIAL M I C R O S O F T A C C E S S 2 0 0 3 Microsoft Access is powerful software designed for PC. It allows you to create and manage databases. A database is an organized body

More information

Structure a Database. Key Concepts LESSON. Access 380. Lesson 2: Structure a Database. Standards

Structure a Database. Key Concepts LESSON. Access 380. Lesson 2: Structure a Database. Standards LESSON Key Concepts Structure a Database In this lesson, you will continue learning skills to use Access in your daily life. You will learn to create the following elements in this lesson: databases, tables,

More information

C omputer D riving L icence

C omputer D riving L icence E uropean C omputer D riving L icence E C D L S y l l a b u s 5. 0 Module 5 Using Databases ECDL Syllabus 5 Courseware Module 5 Contents UNDERSTANDING DATABASES... 1 KEY CONCEPTS... 1 DATABASE ORGANIZATION...

More information

Guide to Table Relationships

Guide to Table Relationships Guide to Table Relationships Table of Contents INTRODUCTION... 2 TYPES OF TABLE RELATIONSHIPS... 2 A ONE-TO-MANY RELATIONSHIP... 2 A MANY-TO-MANY RELATIONSHIP... 2 A ONE-TO-ONE RELATIONSHIP... 2 WHY CREATE

More information

Microsoft Access 2010- Introduction

Microsoft Access 2010- Introduction Microsoft Access 2010- Introduction Access is the database management system in Microsoft Office. A database is an organized collection of facts about a particular subject. Examples of databases are an

More information

Creating tables in Microsoft Access 2007

Creating tables in Microsoft Access 2007 Platform: Windows PC Ref no: USER 164 Date: 25 th October 2007 Version: 1 Authors: D.R.Sheward, C.L.Napier Creating tables in Microsoft Access 2007 The aim of this guide is to provide information on using

More information

Objectives. Understand databases Create a database Create a table in Datasheet view Create a table in Design view

Objectives. Understand databases Create a database Create a table in Datasheet view Create a table in Design view Creating a Database Objectives Understand databases Create a database Create a table in Datasheet view Create a table in Design view 2 Objectives Modify a table and set properties Enter data in a table

More information

ECDL. European Computer Driving Licence. Database Software BCS ITQ Level 1. Syllabus Version 1.0

ECDL. European Computer Driving Licence. Database Software BCS ITQ Level 1. Syllabus Version 1.0 ECDL European Computer Driving Licence Database Software BCS ITQ Level 1 Using Microsoft Access 2013 Syllabus Version 1.0 This training, which has been approved by BCS, includes exercise items intended

More information

Microsoft Access 2010

Microsoft Access 2010 IT Training Microsoft Access 2010 Jane Barrett, IT Training & Engagement Team Information System Services Version 3.0 Scope Learning outcomes Learn how to navigate around Access. Learn how to design and

More information

Access Tutorial 1 Creating a Database. Microsoft Office 2013 Enhanced

Access Tutorial 1 Creating a Database. Microsoft Office 2013 Enhanced Access Tutorial 1 Creating a Database Microsoft Office 2013 Enhanced Objectives Session 1.1 Learn basic database concepts and terms Start and exit Access Explore the Microsoft Access window and Backstage

More information

Consider the possible problems with storing the following data in a spreadsheet:

Consider the possible problems with storing the following data in a spreadsheet: Microsoft Access 2010 Part 1: Introduction to Database Design What is a database? Identifying entities and attributes Understanding relationships and keys Developing tables and other objects Planning a

More information

3 Data Properties and Validation Rules

3 Data Properties and Validation Rules 3 Data Properties and Validation Rules 3.1 INTRODUCTION Once a database table has been created and the fields named and the type of data which is to be stored in the field chosen, you can make further

More information

Handout: Access 2010: Creating Forms

Handout: Access 2010: Creating Forms Access 2010: Creating Forms Table of Contents INTRODUCTION TO FORMS... 4 CREATE A FORM BY USING THE FORM TOOL... 4 CREATE A SPLIT FORM BY USING THE SPLIT FORM TOOL... 4 CREATE A FORM THAT DISPLAYS MULTIPLE

More information

ECDL Module 5 Notes. In normal daily life we make frequent use of databases, and probably don t realize it. Here are a number of simple examples:

ECDL Module 5 Notes. In normal daily life we make frequent use of databases, and probably don t realize it. Here are a number of simple examples: ECDL Module 5 Notes Module 5 Microsoft Access 5.1 Understanding Databases 5.1.1 Key Concepts 5.1.1.1 Understand what a database is. ECDL Module 5 Notes A database is a structured collection of related

More information

MICROSOFT ACCESS STEP BY STEP GUIDE

MICROSOFT ACCESS STEP BY STEP GUIDE IGCSE ICT SECTION 11 DATA MANIPULATION MICROSOFT ACCESS STEP BY STEP GUIDE Mark Nicholls ICT Lounge P a g e 1 Contents Task 35 details Page 3 Opening a new Database. Page 4 Importing.csv file into the

More information

Database File. Table. Field. Datatype. Value. Department of Computer and Mathematical Sciences

Database File. Table. Field. Datatype. Value. Department of Computer and Mathematical Sciences Unit 4 Introduction to Spreadsheet and Database, pages 1 of 12 Department of Computer and Mathematical Sciences CS 1305 Intro to Computer Technology 15 Module 15: Introduction to Microsoft Access Objectives:

More information

Reduced Quality Sample

Reduced Quality Sample Access 2007 Essentials PART ONE Mobile MOUSe Access 2007 Essentials Version # 1.1 Part One 08/08/2010 11:20 About this Course Microsoft Access is the database application included with Microsoft Office.

More information

Ohio University Computer Services Center July, 2004 Microsoft Access 2003 Reference Guide

Ohio University Computer Services Center July, 2004 Microsoft Access 2003 Reference Guide Ohio University Computer Services Center July, 2004 Microsoft Access 2003 Reference Guide Overview Access is a relational database management system (RDBMS). This is a type of database management system

More information

Microsoft Access 2007 Introduction

Microsoft Access 2007 Introduction Microsoft Access 2007 Introduction Access is the database management system in Microsoft Office. A database is an organized collection of facts about a particular subject. Examples of databases are an

More information

EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002

EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002 EXCEL PIVOT TABLE David Geffen School of Medicine, UCLA Dean s Office Oct 2002 Table of Contents Part I Creating a Pivot Table Excel Database......3 What is a Pivot Table...... 3 Creating Pivot Tables

More information

Getting Started with Excel 2008. Table of Contents

Getting Started with Excel 2008. Table of Contents Table of Contents Elements of An Excel Document... 2 Resizing and Hiding Columns and Rows... 3 Using Panes to Create Spreadsheet Headers... 3 Using the AutoFill Command... 4 Using AutoFill for Sequences...

More information

Lab 1. Creating a Database. Objectives. 1 Plan, create, and modify a database. 2 Create and save a table structure.

Lab 1. Creating a Database. Objectives. 1 Plan, create, and modify a database. 2 Create and save a table structure. Creating a Database Lab 1 Objectives After completing this lab, you will know how to: 1 Plan, create, and modify a database. 2 Create and save a table structure. 3 Define field names, data types, field

More information

Topic: Relationships in ER Diagram and Relationships in MS Access

Topic: Relationships in ER Diagram and Relationships in MS Access MS Access Lab 3 Topic: Relationships in ER Diagram and Relationships in MS Access Summary Introduction to Relationships Why Define Relationships? Relationships in ER Diagram vs. Relationships in MS Access

More information

Ken Goldberg Database Lab Notes. There are three types of relationships: One-to-One (1:1) One-to-Many (1:N) Many-to-Many (M:N).

Ken Goldberg Database Lab Notes. There are three types of relationships: One-to-One (1:1) One-to-Many (1:N) Many-to-Many (M:N). Lab 3 Relationships in ER Diagram and Relationships in MS Access MS Access Lab 3 Summary Introduction to Relationships Why Define Relationships? Relationships in ER Diagram vs. Relationships in MS Access

More information

Tutorial 3. Maintaining and Querying a Database

Tutorial 3. Maintaining and Querying a Database Tutorial 3 Maintaining and Querying a Database Microsoft Access 2010 Objectives Find, modify, and delete records in a table Learn how to use the Query window in Design view Create, run, and save queries

More information

Microsoft Office 2010

Microsoft Office 2010 Access Tutorial 3 Maintaining and Querying a Database Microsoft Office 2010 Objectives Find, modify, and delete records in a table Learn how to use the Query window in Design view Create, run, and save

More information

Introduction to MS WINDOWS XP

Introduction to MS WINDOWS XP Introduction to MS WINDOWS XP Mouse Desktop Windows Applications File handling Introduction to MS Windows XP 2 Table of Contents What is Windows XP?... 3 Windows within Windows... 3 The Desktop... 3 The

More information

INTRODUCTION TO MICROSOFT ACCESS Tables, Queries, Forms & Reports

INTRODUCTION TO MICROSOFT ACCESS Tables, Queries, Forms & Reports INTRODUCTION TO MICROSOFT ACCESS Tables, Queries, Forms & Reports Introduction...2 Tables...3 Designing a Table...3 Data Types...4 Relationships...8 Saving Object Designs and Saving Data...9 Queries...11

More information

Database Concepts 3.5

Database Concepts 3.5 Database Concepts 3.5 David M. Kroenke and David J. Auer THE ACCESS WORKBENCH Section 1 Getting Started with Microsoft Access 2007, 2008 and 2009 by Prentice Hall, David Kroenke, and David Auer The Access

More information

Monthly Payroll to Finance Reconciliation Report: Access and Instructions

Monthly Payroll to Finance Reconciliation Report: Access and Instructions Monthly Payroll to Finance Reconciliation Report: Access and Instructions VCU Reporting Center... 2 Log in... 2 Open Folder... 3 Other Useful Information: Copying Sheets... 5 Creating Subtotals... 5 Outlining

More information

Steps to Create a Database

Steps to Create a Database Steps to Create a Database Design the Database In order for a database to be effective some time should be spent on the layout of the table. Additionally, time should be spent on what the purpose of the

More information

Microsoft. Access HOW TO GET STARTED WITH

Microsoft. Access HOW TO GET STARTED WITH Microsoft Access HOW TO GET STARTED WITH 2015 The Continuing Education Center, Inc., d/b/a National Seminars Training. All rights reserved, including the right to reproduce this material or any part thereof

More information

Search help. More on Office.com: images templates

Search help. More on Office.com: images templates Page 1 of 14 Access 2010 Home > Access 2010 Help and How-to > Getting started Search help More on Office.com: images templates Access 2010: database tasks Here are some basic database tasks that you can

More information

ACCESS 2007. Importing and Exporting Data Files. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818) 677-1700

ACCESS 2007. Importing and Exporting Data Files. Information Technology. MS Access 2007 Users Guide. IT Training & Development (818) 677-1700 Information Technology MS Access 2007 Users Guide ACCESS 2007 Importing and Exporting Data Files IT Training & Development (818) 677-1700 training@csun.edu TABLE OF CONTENTS Introduction... 1 Import Excel

More information

Creating a New MS-Access Database

Creating a New MS-Access Database Group Size 3 or 4. Due date : at next week labs. Requirements Using MS Access, implement an application for a students project groups and teachers. What should be covered: Opening a Database The Database

More information

MICROSOFT OFFICE ACCESS 2007 - NEW FEATURES

MICROSOFT OFFICE ACCESS 2007 - NEW FEATURES MICROSOFT OFFICE 2007 MICROSOFT OFFICE ACCESS 2007 - NEW FEATURES Exploring Access Creating and Working with Tables Finding and Filtering Data Working with Queries and Recordsets Working with Forms Working

More information

Introduction to. Microsoft Access 2000. Practicals

Introduction to. Microsoft Access 2000. Practicals Introduction to Microsoft Access 2000 Practicals 1 Contents Practical 1..1 Introduction to Access basics. Getting help in Access. Creating databases and tables. Practical 2 13 More on creating, editing

More information

Access 2010: The Navigation Pane

Access 2010: The Navigation Pane Access 2010: The Navigation Pane Table of Contents OVERVIEW... 1 BEFORE YOU BEGIN... 2 ADJUSTING THE NAVIGATION PANE... 3 USING DATABASE OBJECTS... 3 CUSTOMIZE THE NAVIGATION PANE... 3 DISPLAY AND SORT

More information

Exploring Microsoft Office Access 2007. Chapter 2: Relational Databases and Multi-Table Queries

Exploring Microsoft Office Access 2007. Chapter 2: Relational Databases and Multi-Table Queries Exploring Microsoft Office Access 2007 Chapter 2: Relational Databases and Multi-Table Queries 1 Objectives Design data Create tables Understand table relationships Share data with Excel Establish table

More information

Using Microsoft Access

Using Microsoft Access Using Microsoft Access Microsoft Access is a computer application used to create and work with databases. In computer jargon that means it s a Database Management System or DBMS. So what is a database?

More information

- Suresh Khanal. http://mcqsets.com. http://www.psexam.com Microsoft Excel Short Questions and Answers 1

- Suresh Khanal. http://mcqsets.com. http://www.psexam.com Microsoft Excel Short Questions and Answers 1 - Suresh Khanal http://mcqsets.com http://www.psexam.com Microsoft Excel Short Questions and Answers 1 Microsoft Access Short Questions and Answers with Illustrations Part I Suresh Khanal Kalanki, Kathmandu

More information

Microsoft Access 2010 An Intermediate Guide (Level 2)

Microsoft Access 2010 An Intermediate Guide (Level 2) IT Training Microsoft Access 2010 An Intermediate Guide (Level 2) Contents Introduction...1 Speeding up Table Creation...2 Using Datasheet View...2 Using a Table Template...3 Input Masks...3 Importing

More information

Sage 500 ERP Intelligence Reporting Getting Started Guide 27.11.2012

Sage 500 ERP Intelligence Reporting Getting Started Guide 27.11.2012 Sage 500 ERP Intelligence Reporting Getting Started Guide 27.11.2012 Table of Contents 1.0 Getting started 3 2.0 Managing your reports 10 3.0 Defining report properties 18 4.0 Creating a simple PivotTable

More information

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide Open Crystal Reports From the Windows Start menu choose Programs and then Crystal Reports. Creating a Blank Report Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick

More information

INTRODUCTION TO MICROSOFT ACCESS MINIMAL MANUAL

INTRODUCTION TO MICROSOFT ACCESS MINIMAL MANUAL University of Glasgow Department of Computing Science INTRODUCTION TO MICROSOFT ACCESS MINIMAL MANUAL 1 Databases in Access...2 2 The Database Window...2 3 Help...2 4 Saving...3 5 Wizards...3 6 Tables...3

More information

Working with Access Tables A Continuation

Working with Access Tables A Continuation Working with Access Tables A Continuation This document provides basic techniques for working with tables in Microsoft Access by setting field properties, creating reference tables, sorting and filtering

More information

MICROSOFT ACCESS A. CREATING A DATABASE B. CREATING TABLES IN A DATABASE

MICROSOFT ACCESS A. CREATING A DATABASE B. CREATING TABLES IN A DATABASE Prepared for MIS 6326 by Dr. Sumit Sarkar 1 MICROSOFT ACCESS A database is a collection of different types of data, stored in a manner to facilitate use in diverse ways. In Microsoft Access 2000, a database

More information