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

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • salzan
    New Member
    • Feb 2008
    • 38

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

    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 programmaticall y 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
  • salzan
    New Member
    • Feb 2008
    • 38

    #2
    Any ideas, anyone?
    Thank you,
    Salzan

    Comment

    • Scott Price
      Recognized Expert Top Contributor
      • Jul 2007
      • 1384

      #3
      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

      Comment

      Working...