Execute series of Queries in VBA

mdbBound

Registered User.
Local time
Today, 15:14
Joined
Dec 8, 2003
Messages
43
Hello everyone.

I have a series queries that I want to execute by clicking the command button. I remember someone said I can use the.Execute to do this but I do not now how exactly

What is the difference between DoCmd and Execute?

Please help. Thank you;)
 
Last edited:
mdb,

You can also use the DoCmd.OpenQuery and open a series of
queries. As far as I know, there is no difference between the
two methods. The dbs.Execute method requires that you have
dbs pointing to an Active Access database.

What are you looking for?

Wayne
 
Hi Wayne,

Thank you for taking some time to answer my question.

I have Select queries and also Action queries that I want to run by clicking the command button. I have been reading some post and found out that I can use:

DoCmd.OpenQuery("MySelectQ.qbe") - for select queries
DoCmd.Execute("MyActionQ.qbe") - for action queries

So do I just enter this to my command button using the OnClick event? The code I see contains the declarations. Do I need those declaration and will it be best practice to do so?

My application will have 10 concurrent users and will have split FE/BE type.

Can you also please explain in the simplest form what querydefs are. Are these all the saved queries i find when I click my queries tab. I read that these are containers that I create when i declare them to hold the queries??? Very confused on this area. I went to microsoft website, those explanation are to technical for me.

Thanks for your advice.
 
Hi Wayne
Would you just list the queries under the DoCmd.OpenQuery then please? Could you code the queries not to show their warnings as they appear?
Cheers
 

Users who are viewing this thread

Back
Top Bottom