-----Original Message-----
correct
items. show
in the query.
Thank you very much for your reply, but I need a little
more help. I had no problem creating the form with the
combo box and command button. I assume it is through the
Properties of the command button that I enter
the "DoCmd. . . ." text as you have suggested. However,
when I click on the three little dots at the right side of
the OnClick line, the code seems to have a lot more in it
than I was expecting. Can you give me any more specific
help? Thanks again.
I take it all is well up until this point...
Add a command button to the form.
You have command button. Did you use the Wizard?
If so, did you select the query to be opened?
Assuming yes to the above questions, open the form in design view.
Select the new command button.
Show the Property sheet.
Click on the Events tab.
Click on the On Click line.
The line should have [Event Procedure] on it.
Click on the button with the 3 dots.
When the code window opens you will see the code that the wizard wrote
for you to open the query.
Find the DoCmd.OpenQuery line.
Directly under it add
DoCmd.Close acForm, Me.Name
Exit the code window.
You're done.
If you did not use the wizard, then do exactly as indicated above, down
to the Click on the On Click line.
Now type [Event Procedure] on that line.
Click on the button with the 3 dots that will appear.
There will be 2 existing lines of code.
Type, between those 2 existing lines....
DoCmd.OpenQuery "TheQueryNameHere"
DoCmd.Close acForm, Me.Name
Exit the code window.
You're done.
--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.
.