- To create a new query, on the main menu, click Insert -> Query
- In the New Query dialog box, double-click Simple Query Wizard
- In the first page of the wizard, in the Tables/Queries combo box,
select Senators
- In the Available Fields, double-click SenatorID and LastName
- In the Tables/Queries combo box, select Genders
- In the Available Fields, double-click Gender
- Click Next
- Change the name of the query to SenatorsByGender
- Click the Modify The Query Design radio button and click Finish
- In the lower section of the table, change the LastName string to
Senator: [LastName] & ", " & [FirstName] and press
Enter
- Switch the query to Datasheet View to view the result
- Save the query and close it
- On the Database window, click Forms
- To design a query that uses various tables, on the main menu, click
Insert -> Query
- In the New Query dialog box, double-click Design View
- In the Show Table, double-click States, Senators, and Parties
- Click Close
- In the lists that display in the top section of the window, click
any field and press F6
- In the first column where the caret is, type Senator: [LastName] & ", " & [FirstName]
- From the Parties list, drag Party and drop it in the second column
- From the States list, drag State and drop it in the third column
- Save the query as SenatorsPartyAndState and switch it to Datasheet
View
- Close the query
- Using the same technique, create a query based on the Senators, the
States, and the Parties tables. Set the expression of the first column
to
Senator: [LastName] & ", " & [FirstName]
Set the second column to Party from the Parties table, the third
as State from the States table, the fourth as MaritalStatusID from the
Senators table, and the last as GenderID from the Senators
- Save the query as SenatorsMaritalStatus and switch it to
Datasheet View
- Close the query
|