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'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