Silent Queries

Jbozward

Registered User.
Local time
Today, 16:08
Joined
Oct 10, 2002
Messages
14
Hello all,

I'm a bit green with VB so appologies up front!!!!

Does anyone know of a way to stop the pop-up boxes for make table and append queries, and to default to OK???
I would like to run this little bit of code automaticly without having to click OK a million times!!!!
Here is a snippet of my code...

Private Sub Audi_Import_Click()
Dim Response
Response = MsgBox("! WARNING !" & Chr(13) & "Are you sure you want to do this???", vbYesNo)
If Response = vbNo Then End
DoCmd.OpenForm "Form - Please wait", acNormal
DoCmd.RepaintObject acForm, "Form - Please wait"
On Error Resume Next
DoCmd.DeleteObject acTable, "Table - Audi - Backup"
On Error GoTo Err_Audi_Import_Click
DoCmd.Rename "Table - Audi - Backup", acTable, "Table - Audi - Internal data"
DoCmd.OpenQuery "Conversion - Audi - Database Conversion", acViewNormal, acEdit
DoCmd.CopyObject , "Table - Audi - Internal data", acTable, "Blank - Audi"
DoCmd.OpenQuery "Conversion - Audi - Append", acViewNormal, acEdit
DoCmd.DeleteObject acTable, "Table - Audi - Converted"
DoCmd.Close acForm, "Form - Please wait"
Exit_Audi_Import_Click:
Exit Sub
Err_Audi_Import_Click:
MsgBox Err.Description
Resume Exit_Audi_Import_Click
End Sub

Many thanks
 
DoCmd.SetWarnings False

' the code that brings up the warnings you want disabled

DoCmd.SetWarnings True
 

Users who are viewing this thread

Back
Top Bottom