By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,288 Members | 1,695 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,288 IT Pros & Developers. It's quick & easy.

Query against a temp table (table created by VBA code)

P: 38
I create a temp table (using ADOX) and populate it from my form based on various conditions. Now, I'd like to report the results using Reports. I have a query and a report and they work fine. What I need to do now is change the table name in my query so the report runs against a new table/query. Is there a way for me to programmatically change the sql string of a query or perhaps is it possible to have the table name act as a variable to be resolved at run time?

Greatly appreciate your help in adavance.
Regards,
Salzan
Feb 22 '08 #1
Share this Question
Share on Google+
2 Replies


P: 38
Any ideas, anyone?
Thank you,
Salzan
Feb 23 '08 #2

Scott Price
Expert 100+
P: 1,384
Kindly post the code you are using.

In reference to your question of using a variable to hold the table name, I don't see why it wouldn't work. Have you tried it?

Regards,
Scott
Feb 23 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.