Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selections on query 1

Status
Not open for further replies.

hanroo

Programmer
Mar 21, 2007
2
NL
Hi,

I am using the docmd.openquery in a form. I would like to add some selections to the query that are entered on the form. On the openform or openreport command I can add as many selections as I like, but how to do that when you want to open a query and only want to see a small part (selections) of the query?

Thank you!
hanroo
 
Either create a query that has a where clause that restricts what you see, or a techique I use:

Create a form in datasheet view based on the table or query you want. You can then use OpenForm to open it and pass across the where clause that restricts what gets shown.

Datasheet view looks so similar to a query, that in real terms there's not much difference, but because its a form, you can have proper event handlers which makes a lot of difference if you are trying to do something relatively complex.

John
 
Thanks John!
You are right: Opening a form in datasheet-mode gives me much more possibilities.

Thanks,
hanroo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top