turn off over write confirmation using microsoft access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm using access 2002 and I'm trying to automate a procedure using a macro.
The macro essentially exports a query as html, but asks me everytime if I
want to overwrite the old file?

How do I turn the overwrite confirmation off?
 
Anthony -

Set Warnings = No should do this for your macro. Make this the first line
of the macro.
HTH
 
This didn't work, can you think of another way? I looked into deleting the
html file first inside the macro but that doesn't appear to be working
either.
Thanx for your prior post too!
 
Anthony -

Sorry. Have you stepped through the macro, and where is this happening?
Maybe you could convert the macro to code and post the code? I'm out of my
depth here :)
 
actually i've since got it working.
I used the "sendkeys" action and used "y" (for yes) to accept the overwrite.
it works perfectly now.
thanx for your time :)
 
I'm using access 2002 and I'm trying to automate a procedure using a
macro. The macro essentially exports a query as html, but asks me
everytime if I want to overwrite the old file?

First of all, this has little or nothing to do with Tables and DB Design.
Still, here goes...

Second of all, just don't use macros: they are extremely limited, for
example in not handling any error conditions or program control.

Third of all, if you use VBA to do this, you can make sure to Kill the
file explicitly before rewriting it; or else give the new a new name,
perhaps based on today's date; or store away yesterday's back up, etc.

SendKeys in particular is likely to catch you out big-time sooner or
later: you don't really know what dialog is going to pop up and be
answered with a "Yes"...

"Do you really want to install this
<unknown email attachment> application?"

[[Yes]] [No] [Cancel]


All the best


Tim F
 
Back
Top