A
Access::Student
Hello,
I'm drying to use VBA to delete an auto-generated error table but I can't
figure it out.
What I'm doing is running the following script from a button:
Private Sub Update_Assets_Click()
Application.DoCmd.SetWarnings False
DoCmd.RunSavedImportExport "Update_Assets"
DoCmd.OpenQuery "Add_Assets"
DoCmd.OpenQuery "Update_Assets"
DoCmd.RunSQL "DROP TABLE Database_Export;"
Application.DoCmd.SetWarnings True
End Sub
That works fine, but the Import step sometimes generates a table called
"Database_Exports$_ImportErrors" . What I tried to do was add the following
line after the other SQL line:
DoCmd.RunSQL "DROP TABLE Database_Export$_ImportErrors;"
But I get an error message and the script crashes. I have no idea why. Any
ideas?
Syntax error in DROP TABLE or DROP INDEX. (Error 3295)
I'm drying to use VBA to delete an auto-generated error table but I can't
figure it out.
What I'm doing is running the following script from a button:
Private Sub Update_Assets_Click()
Application.DoCmd.SetWarnings False
DoCmd.RunSavedImportExport "Update_Assets"
DoCmd.OpenQuery "Add_Assets"
DoCmd.OpenQuery "Update_Assets"
DoCmd.RunSQL "DROP TABLE Database_Export;"
Application.DoCmd.SetWarnings True
End Sub
That works fine, but the Import step sometimes generates a table called
"Database_Exports$_ImportErrors" . What I tried to do was add the following
line after the other SQL line:
DoCmd.RunSQL "DROP TABLE Database_Export$_ImportErrors;"
But I get an error message and the script crashes. I have no idea why. Any
ideas?
Syntax error in DROP TABLE or DROP INDEX. (Error 3295)