MsgBox - autoexec macro

P

pm

upon opening my database I have a message box that asks "are you ready to run
the bank and register macros?" with a yes or no choice. this is in the
condition column. In the action column I have RunMacro - name AutoExec, then
in the next row RunMacro - bank load, and the next row RunMacro - Register
load, and finally it opens a report before ending. My question is - and
hopefully this makes sense - when answering the question in the message box
to- "NO" i want the macro to stop all, otherwise run the macro. I know I
have to put a condition in somewhere - but i don't know exactly where.....In
otherwords I want the macro to run only once - the first time the database is
opened each day, after that I want to answer the question with a
'NO'.......and it stop processing the other macros....can anyone please help?
 
S

Steve Schapel

Pm,

The numerical value for Yes is 6, so test for this in the Condition, i.e....
MsgBox(.. ..)=6

It seems odd to have a macro using a RunMacro to run the AutoExec macro
- I think this needs revising.
 
P

pm

Thanks for the coments Steve. I originally set up the autoexec macro so it
would of course kick off when opening the database- however; the person using
this database will probably access it more than one a day. That's why I
included a message box - so she could choose to not run the macro. But when
you select the 'NO' button, the macro still runs......any other
suggestions???? Thanks in advance.
 
S

Steve Schapel

PM,

My only suggestion is you haven't set up the macro correctly. :)

So can you please give full details of the macro, i.e. Actions and
Arguments, so we can see what we are working with? Thanks.
 
P

pm

Ok, in the Condition column I have MsgBox("Are you ready to run the Bank Load
and Register Macro?",4,"question")...under Action same row as condition
column I have MsgBox, under that RunMacro - Macro Name = Import bank load,
under RunMacro, another RunMacro - macro name = ImportRegisterFile, and
finally the last row under Action - OpenReport = Bk Activity without matching
Register in Print Preview. In the column Macro Name I have AutoExec.....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top