Scheduled Task : Press "Yes" Control Pop-Up Automatically for a "Delete" SQL event

A

A Techie

All --

Hello !

I've got a scheduled task running on Windows 2000 server in conjunction
with Access 2000 to run a macro which deletes a group of records.

This macro runs perfectly excepting for the fact that a prompt occurs
asking if one would like to delete those records.

How do I automate this portion of my macro to 'click on the YES button'?

I've been playing with the 'SendKeys' action within the Access 2000
macro to no avail.

Any ideas or suggestions would be very, very cool.

Thanks, Best,

-- B.
 
A

Al Camp

A Techie,
I think you're referring to the Access "warning" prompt that appears
whenever you delete a record.
Check out SetWarnings in Help. It allows you to suspend "action query"
warnings. (MakeTable, Updates, Dels, etc...)

DoCmd.SetWarnings False 'Action query msgs will not appear
'Your deletion code here
DoCmd.SetWarnings True 'Turn it back On again
 
R

Rick Brandt

A Techie said:
All --

Hello !

I've got a scheduled task running on Windows 2000 server in conjunction
with Access 2000 to run a macro which deletes a group of records.

This macro runs perfectly excepting for the fact that a prompt occurs
asking if one would like to delete those records.

How do I automate this portion of my macro to 'click on the YES button'?

I've been playing with the 'SendKeys' action within the Access 2000
macro to no avail.

If you use the Execute method to run the query instead of DoCmd, then you will
not get a prompt.

CurrentDB.Execute "YourQueryName", dbFailOnError
 

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