Auto Confirmation after running update query

G

Guest

I am running the following query through a macro at the end of every day
through the windows scheduler:

UPDATE ItemMaster INNER JOIN AMFLIB_ITEMASA ON
ItemMaster.ITNOIM=AMFLIB_ITEMASA.ITNBR SET ItemMaster.UCDEF =
AMFLIB_ITEMASA.UCDEF;

However, when it finishes, it asks for a confirmation to update xxxx
records. I tried to enter a SendKeys action with the keystroke Y or {ENTER},
but it does not answer the dialog box. How do I answer this dialog box,
which expects you to click on the YES command button?
 
E

Ed Metcalfe

mslee65 said:
I am running the following query through a macro at the end of every day
through the windows scheduler:

UPDATE ItemMaster INNER JOIN AMFLIB_ITEMASA ON
ItemMaster.ITNOIM=AMFLIB_ITEMASA.ITNBR SET ItemMaster.UCDEF =
AMFLIB_ITEMASA.UCDEF;

However, when it finishes, it asks for a confirmation to update xxxx
records. I tried to enter a SendKeys action with the keystroke Y or
{ENTER},
but it does not answer the dialog box. How do I answer this dialog box,
which expects you to click on the YES command button?

Have a look at the SetWarnings action in your macro. You need to turn them
off before running the query, and the turn them back on again.

Be aware that this will also supress any messages about records that have
not been updated (for index/validation violations, for example).

Ed Metcalfe.
 

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