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

Passing Data from a Form to a Query

Status
Not open for further replies.

zdas04

Technical User
Sep 9, 2003
29
US
I have an Access 2002 form that selects records (that is working fine) then it has this nasty "Print Report" button. At that point I pass all the database keys that have been selected on form to a VBA module to run the report.

I've tried the DoCmd.RunSQL command, but it is a "simple" select query that doesn't update or delete anything so it didn't work. I tried the DoCmd.OpenQuery command, but I have not found a way to shove the database keys that I picked off the form into the query.

I have no problem with this being either an imbedded SQL query or a DesignView regular query, I just need it to work.

Thanks for your help.

David
 
I just pulled my head out and found what I was looking for in the FAQ. This turned out to be as easy as it should have been, well we all need to occasionally waste a day.

David
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top