Avoid being prompted during Queries

  • Thread starter Thread starter stevehat
  • Start date Start date
S

stevehat

I am an XP user with Access 2003. I recently created a Macro for a
client that will run certain queries and create newly exported tables.
Everything works great, but I do not want the prompts that tell me I'm
about to delete a table, etc... I've gone into Tools-->Options and
have unchecked all three boxes in the "confirm" area. Unfortunatley,
this did not get rid of the prompts that ask me if I'm sure I want to
delete a table. Any easy suggestions.

Thanks!

Steve H.
 
Actually, I just transferred the database to the clients computer.
They are running Windows 2000 and Access 2000. Everything works fine
in the macro, except for the fact that it asks if I want to replace the
old export Excel file with the newer one. These exports will be
performed on a monthly basis by people with limited decision making
skills when it comes to technology, so I was hoping that no window
would pop up. Any more suggestions?
 
In code, you can use Dir() to see if the field exists, and Kill it if it
does.

This kind of thing:
Dim strFile As String
strFile = "C:\MyFile.xls"
If Dir(strFile) <> vbNullString Then Kill strFile
DoCmd.TransferSpreadsheet acExport, ,"Query1", strFile
 
Back
Top