Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unexpected Error...

Status
Not open for further replies.

istone

IS-IT--Management
Jan 24, 2007
139
US
Hi All,
I have a button in a form with the following code:
te Sub CmdGo_Click()
On Error GoTo Err_CmdGo_Click

Dim stDocName As String

DoCmd.SetWarnings False

DoCmd.RunSQL ("Delete from AANAME") 'AANAME
DoCmd.RunSQL ("Delete from AAProd") 'AAProd
DoCmd.RunSQL ("Delete from AALINK") 'AALINK
DoCmd.RunSQL ("Delete from AACTRN") 'AACTRN
DoCmd.RunSQL ("Delete from AAADDR") 'AAADDR

Dim qry As Variant
qry = Array("QryUpdateDBFAAprod", "QryUpdateDBFAANAME", "QryUpdateDBFAALINK", "QRYUpdateDBFaactrn", "QryUpdateDBFAAAddr")

Dim i As Integer

For i = 0 To 4
stDocName = qry(i)
'MsgBox qry(i)
DoCmd.OpenQuery stDocName, acNormal, acEdit
Next i
DoCmd.SetWarnings True
MsgBox "Build of Local Data for AA Complete", vbInformation, "Build AA Data"

Exit_CmdGo_Click:
Exit Sub

Err_CmdGo_Click:
MsgBox Err.Description
Resume Exit_CmdGo_Click

I run this code from my pc without a problem, but someone else get an error message when they run it from their pc. Here is the error:

Unexpected error from external database drive 10023

your help is appreciated and thanks in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top