Steve,
You need to create a second form to display the results of your selection criteria instead of displaying them in query view.
Create a new from by selecting 'Create form by using wizard' in the database window.
On the Wizards first page:
1. Select 'Query: qryStaffLocator' form the Tables/Queries dropdown list.
2. Move all Available Fields to the Selected Fields list (FirstName, LastName, Office, Department).
On the Wizards 2nd and 3rd pages select columnar layout and standard style (or whatever you like).
On the Wizards last page:
1. Name the form 'frmStaff'.
2. Select the 'Modify in Design View' option button.
When the form opens in design view, simply close it.
Go to the code window behind your selection dialog form (frmStaffLocator)
Change this line:
DoCmd.OpenQuery "qryStaffLocator", acViewNormal, acEdit
to this line:
DoCmd.OpenForm "frmStaff", acNormal
Now open your frmStaffLocator dialog, select criteria, and press OK. Your form will open and display records that meet your criteria, instead of your query.
What you have done is set your frmStaff's Record Source property to 'qryStaffLocator' which you can see by clicking on the Data tab of the form's properties window when you are in design view.
Post again is you have further questions.
Bob
|