Cape May County ETTC Technology Proficiency Courses
TPC15-2 Intermediate Access part 2
Using an Access Database in a Word Mail Merge
Queries
>= 200
<> 200
>= "N"
Between 2 And 5
Between #2/2/95# An #2/3/98# (for a date field)
Between [enter first value] and [enter second value]
In (A, B, C)
Null
Is Not Null
Like "A"
Not "A"
Not "A*"
Right([Zip Code],2="11")
Examine this site (good review of query wizards) - http://www.rose-hulman.edu/WCC/Software/Documentation/Workshops/acs97b/acs97b-5.html
Relationships Between Tables
Types of relationships - http://msdn.microsoft.com/library/officedev/off2000/accondeterminerelationshipsfordatabases.htm
Using relationships –http://databases.about.com/compute/databases/library/weekly/aa031801a.htm
- Close all databases and open the customer database.
- When you use multiple tables for a query, Access needs to establish a relationship. Start a new query. Add the customers and orders database. Notice how a simple link is established. Between the field that is shared by both tables.
- Add customerID and last from the customers database and product and quantity from the Orders table.
- View the query.
- Close the query. Do not save it.
- GO to the database window. From the toolbar, click the Relationships button.
- Add the customers and orders tables. Close the Add Tables window.
- Point to the customerID field in the table list for the customers table.
- Drag from customerID in the customers table over to the customerID field in the orders table. When you are pointing to the middle of the customerID field in the orders table, let go of the mouse button.
- Now click the join types button. Make sure the first option is selected. Click OK.
- Close the tables, if asked to save layout, click Yes.
- Create a new query. Add the customers and orders table. Select customer ID and product from the orders table. View the query.
- Close the query and do not save.
- Go back to the Relationships window and double click on the link (must be pointing in the middle of the link).
- A dialog button should open. Click the join types button. Select the second option. Click OK.
- Create a new query. Add the customers and orders table. Select customer ID and product from the orders table. View the query.
- Close the query and do not save.
- Open the Relationships window. Click on the link between the two tables (need to try and point right at the middle and right on the line) and right click to delete the relationship.
- Now clear the layout completely and save the layout.
Lookup Columns
last modified 5/15/01