Call query

dealwi8me

Registered User.
Local time
Today, 21:06
Joined
Jan 5, 2005
Messages
187
How can i call a query in MS Access through a module in Code Builder?

Thank you!
 
docmd.openquery "myquery"

Not sure if thats what your after.

And to Modest, how about you answer the question rather than ear bashing with your own preferences for the way things should be done.
 
meboz said:
docmd.openquery "myquery"

Not sure if thats what your after.

And to Modest, how about you answer the question rather than ear bashing with your own preferences for the way things should be done.
I don't have all the answers, I'm not always right, and I have plenty of questions, but don't supersede my curiosity for stupidity - I have my reasons. If that's not enough I have GPAs, SAT scores, and a nice salary to back me up. So when it comes down to me being logical and you trying to "bash" something I do - just dont.

Deal:
You said you wanted it done in Code Builder, but I was making sure you didn't mean Expression Builder. Most newcomers refer to code builder as the programming platform it uses (VB). In fact, a lot of people that use it don't know what Code Builder is. Just so you know, there are plenty of ways to open/run a query from a module (Meboz showed you one of the many), but before we get into that I wanted to first make sure you were referring to VBA and not the expression builder.
 
Last edited by a moderator:
Modest: i know that Code Builder is for VB, but i was looking something to run a query through a module, without have to create the "UPDATE..." part in VB. I think meboz's solution will do what i want.

Thank you both for answering my question and try to help me :)
 
Look into:

docmd.runsql "queryName"
-or-
do a search on ".openrecordset"

I think now is a good time for you to learn some DAO :)
 

Users who are viewing this thread

Back
Top Bottom