Combine queries

thart21

Registered User.
Local time
Today, 05:45
Joined
Jun 18, 2002
Messages
236
Wondering if this is possible. I'm trying to clean-up my db and have about 8 separate SELECT queries that I am running from a macro and exporting to Excel. Can I create a module with all of these queries so I can delete the 8 separate ones?

Thanks
 
You can't put queries directly into a module. If you want to, you can rewrite everything (the code to run the queries and the SQL syntax for each query) in VBA in a module . . .
 
I may be wrong, but you can use sql queries to run action queris or to form a recordset, but not to run a select query. I would definitley be interested if this is wrong. To put this in a module, I think you will need to have the underlying queries anyway...
 
That's what I meant, sorry I wasn't clear on that. I do want to create all of the queries within the module, just wasn't sure if it was doable or even made sense.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom