Select option on dialog box

rustyg

life enthusiast
Local time
Today, 09:43
Joined
Jun 1, 2005
Messages
22
Hi,

I am using a macro to run a few extractions from our SAP system. It involves opening a form, going to a record, getting focus on the "extract" button, and viola, its done (the extraction takes about half an hour and it is done multiple times) Everything is going fine except 2 dialog boxes come up per extraction and have to be clicked in order to keep going. I have turned msgboxes off, but these ones need input.

What is the best way to go about making the dialog boxes always have the "no" condition activated when they come up.

The reason is that I want to be able to run this macro when I am just about to go home, and have all the tables updated by the morning.

Any takers?

Russ
 
What are the messages on these dialog boxes?
 
First one says "you are about to extract 61877 to table TSTBeforeRefresh, do you wish to continue?" then it has the "yes" and "no" options.

The second one says "would you like to open the table TSTAfterRefresh?" and has "yes" and "no" options.

I want to answer "No" to both.
 
Sorry, but I don't get it.
Are these messages given to you by SAP or Access?
And why do you want to say «No» to these questions if you asked for those extractions?
Finally, when you say: «I have turned msgboxes off» do you mean you added «Set Warnings = False»?
 
Sorry Mate,

I have set warnings to off, but apparently (from looking in the help database) that this only turns off modal warnings, and any dialog box that requires a yes or no input is still displayed. The dialog boxes are displayed by ACCESS and only pertain to the tables created by the "make table" queries that run as a part of the macro.

Sorry if I led you down the garden path, but for the first dialog box I want to answer "YES" and for the second one "NO".

Russ
 
Ok I have found the "send keys" command, but it sends the keystroke before the dialog box comes up, is there any way to make it wait for the box to come up before sending teh {ENTER} command?

Russ
 
I really don't get it.
Adding «Set Warnings = False» in your macro should block these messages boxes. Maybe if you try within the VBA code that would work better. In your extract_click() method, add this line:
«DoCmd.SetWarning False»
If that still doesn't work, I really don't know were the problem lies. Sorry!
 

Users who are viewing this thread

Back
Top Bottom