D
DanDungan
Hi,
In Access 2000 on Windows XP, I'm using a macro to import files to a
table. I use an update query to scrub the file and an append query to
move the records from the temp table to the production table. These
generate messages that the macro echo off command doesn't suppress.
Then the user has to click repeated on the dialog boxes that pop up.
If they choose a no answer accidentally, the process fails and their
information isn't available to them.
I've converted the macro to vba but the boxes continue to pop up. How
can I suppress these query messages or write vba to accomplish this
import without the messages.
Thanks
Dan
Here's the macro.
Function mcrImportData()
On Error GoTo mcrImportData_Err
DoCmd.Echo False, ""
DoCmd.OpenQuery "qry_Delete_data", acNormal, acEdit
Call FunCopyRename
Call ImportEveryFile
DoCmd.OpenQuery "qry_DeleteNullData", acNormal, acEdit
DoCmd.OpenQuery "qry_UpdateDataRemoveQuotesFromRefNum", acNormal,
acEdit
DoCmd.OpenQuery "qry_AppendDataToHistory", acNormal, acAdd
DoCmd.Echo True, ""
mcrImportData_Exit:
Exit Function
mcrImportData_Err:
MsgBox Error$
Resume mcrImportData_Exit
End Function
In Access 2000 on Windows XP, I'm using a macro to import files to a
table. I use an update query to scrub the file and an append query to
move the records from the temp table to the production table. These
generate messages that the macro echo off command doesn't suppress.
Then the user has to click repeated on the dialog boxes that pop up.
If they choose a no answer accidentally, the process fails and their
information isn't available to them.
I've converted the macro to vba but the boxes continue to pop up. How
can I suppress these query messages or write vba to accomplish this
import without the messages.
Thanks
Dan
Here's the macro.
Function mcrImportData()
On Error GoTo mcrImportData_Err
DoCmd.Echo False, ""
DoCmd.OpenQuery "qry_Delete_data", acNormal, acEdit
Call FunCopyRename
Call ImportEveryFile
DoCmd.OpenQuery "qry_DeleteNullData", acNormal, acEdit
DoCmd.OpenQuery "qry_UpdateDataRemoveQuotesFromRefNum", acNormal,
acEdit
DoCmd.OpenQuery "qry_AppendDataToHistory", acNormal, acAdd
DoCmd.Echo True, ""
mcrImportData_Exit:
Exit Function
mcrImportData_Err:
MsgBox Error$
Resume mcrImportData_Exit
End Function