sendkeys

moorsey

Registered User.
Local time
Today, 01:19
Joined
Dec 28, 2005
Messages
49
Right, I have a macro running that firstly imports a .txt document, then runs a delete query on the data, this delete query brings up two warning messages about the deleting of data before carrying onto the next query. I am trying to use send keys to just send "enter" twice to get past the two message boxes without user input.

Firstly im not sure exactly how to represent "enter" in the sendkeys box

Secondly, is there anything I have to type in with the two enters?

Windows help didn't provide me with much information
 
You would have to use <Enter> but why can't you use the set warnings in the macro?
 
right, tried setwarnings, didnt actually know it existed!

It doesnt stop the messages that I get, because they require "user input", not just a straight "ok" but "yes" "no" "cancel"

tried <Enter><Enter> in the sendkeys box but guess its not as simple as that

thanks
 
If you 'setwarnings false' then the convirmations about deleting records from a delete query shouldnt pop up any more.

But if you are automating stuff you should really try doing it with VBA instead of macro's much more flexible.

Currentdb.execute "queryname"

will allways execute a delete/append/create query without any message beeing displayed...
 
just tried setwarnings again, didn't realise it had to go at the top of the macro, just played around with it abit, thanks again

would use VBA code if I had the knowledge, wouldn't know where to start, will work my way there though
 

Users who are viewing this thread

Back
Top Bottom