MS Access 2013 - Macros - How to run a macro from start to finish.

I have written a macro that runs a series of queries and displays a message when the mactro ends. When i run the macro it stops at each query and then asks if it should run that query.

At one point I used to know the command that when placed in a macro the macro ran from start to fnish without stopping along the way. However i forgot that line of code.

Question: What command and syntax to add to the macro code to allow it to run from start to finish without stoping unless there is an error?

Question Part 2 : Can i usee this same Commenad and Syntax in Access 2013 VBA ?


Thanks for you asistance
LVL 1
Lou DufresneIT Business Analyst CSM / Project ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rgonzo1971Commented:
HI,

Show all actions and use set Warnings on No at the beginning

and yes at the end or whenever you need it

You can convert your macros to vba wit th button in Macro Tools Design / Tools / Convert Macros to Visual Basic

Regards
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ryan ChongCommented:
>>What command and syntax to add to the macro code to allow it to run from start to finish without stoping unless there is an error?

Not too sure what prompting to stop your macro to run from start to the end as by default the macro should run without pausing itself unless it encountered and error.

But, you may try this command:

Docmd.SetWarnings false

But by placing this command into your macro, your error handling must able to capture any expected errors if there's any.
0
PatHartmanCommented:
Having warning off is DANGEROUS so make absolutely certain to turn the warnings back on after the queries run.  I always set the hourglass ON when I set warnings OFF and vice versa to give myself a visual reminder that warnings are off.  The bad thing about warnings being off is if you close some object you have changed, Access will silently discard the changes rather than prompting you to save.  That is why it is critical to get them back on ASAP.  You only have to be burned once to have this etched in your brain.
0
Lou DufresneIT Business Analyst CSM / Project ManagerAuthor Commented:
Thanks everyone
    Together these answers are exactly what I needed.

Ldufresne
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.