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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass an existing query criteris using VB

Status
Not open for further replies.

act2

Technical User
Dec 17, 2005
34
US
I would like to be able to reference an existing query and pass it criteria using VB. I have tried DLookup and the DoCmd with no luck any suggestions. Thanks
 
Have a look at the QueryDef object and its Parameters collection or its SQL property.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
If the DLookup working would solve the problem, look for the knowledge base article "Description of DLookup() usage, examples, and troubleshooting".

The variable concatenation can be a bit mystifying at first.

HTH,

alr

_____________________________________
If a large part of intelligence is the ability to generalize, it is ironic that a large part of what we call wisdom is the ability not to generalize.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top