Setting Query Arguments

Dominato

Registered User.
Local time
Today, 20:14
Joined
Apr 10, 2002
Messages
19
I have a query that prompts a user for input. However, in some reports I have that use the query, I'd rather just set the value instead of prompting for it (while others I need the prompt). Is there a way to do this without creating a new query? Basically, is there a way in VBA to pass an argument to the query?
 
Go into a VBA window and start typing:
DoCmd.OpenReport "ReportName"
and start hitting commas to cycle through the options. One of them is a WHERE clause where you can specify additional conditions not made in your query.
 
Thanks for the reply, but thats not quite what I wanted. I dont want to specify additional conditions, I just want to set the already existing ones (meaning set the values in code rather then having the query prompt the user).
 
Ohh, hmmm.
Well, if you're prompting your users with a popup form, you could plug the values you want into that popup form (maybe open it hidden if need be) to supply the answers you want to set in this case, otherwise open it normally and let them put the values they want.
 

Users who are viewing this thread

Back
Top Bottom