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

Passing parameters to a querry without ADO

Status
Not open for further replies.

Lysander

Technical User
Jun 26, 2002
4
CA
Hi

I am trying to call an access querry and pass it the values for the parameters without Access prompting the user for those parameters.

I dont think I can use ADO (this if for a Word mail merge)
and the mailmerge.openDataSource method only accepts either SQL or a connection in the form of "Query QueryName"

but I cant figure out how to pass the parameters.
the only way I have been able to get the desired results is to dynamically build a string that effectivly is the sql of my query and pass that to the openDatasource method

does access have a way to do this properly?
 
Just a little more info
the FAQs ( which I should have read first ) do show a way to work around this which does work. I was wondering if there was a more direct way to do this ie. docmd queryname(param1,param2)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top