M
mcwebtree
Hi
I have an access 2000 database running a custom application. I have a
record management form which displays all the details for an item in the
system, (covers 4 main tables, decending in details 1 -< 2 -< 3 -< 4 >- 5 and
a lookup). The fornt end stores the code, and the backend data store is
another access 2000 db linked in.
The problem is when I use the search for another record code I've written,
it works fine for the first 7 or 8 searches, then I get an error message
Error 3000 "Reserved Error (-1104) There is no msg for this error" then
after that another message "Run Time Error 3048 Cannot open any more
databases". If I close the form and re-open it it works fine for another 7/8
hits. I don't understand it as the code to search for another record closes
the main form, opens a search form, and then reopens the main form with a new
filter.
The control code is:
+++++++++++++++++++++++++++++++++++++++++++++++
Private Sub cmdNext_Click()
On Error GoTo err1
Dim fStock As Boolean
''
' release the lock on the current ticket number
''
clearLock Me!rTicketNumber
fStock = Me!iStock
DoCmd.Close acForm, Me.Name
If fStock = True Then
stockenquiry
Else
openMgtEnquiry
End If
end_err1:
Exit Sub
err1:
MsgBox Err.Description, vbCritical, "Error No. " & Err.Number
Resume end_err1
end sub
+++++++++++++++++++++++++++++++++++++++++++++++++
The error occurs on the docmd.RunSQL line of the following function
the variable strSql contains
DELETE FROM jrmLock WHERE lRTicketNumber = 'A00008'
+++++++++++++++++++++++++++++++++++++++++++++++++
Public Function clearLock(strTicketNumber As String)
'on error goto err1
Dim strSQL As String
strSQL = " DELETE FROM jrmLock " & _
" WHERE lRTicketNumber = '" & strTicketNumber & "'"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
end_err1:
Exit Function
err1:
MsgBox Err.Description, vbCritical, "clearLock Error " & Err.Number
Resume end_err1
End Function
+++++++++++++++++++++++++++++++++++++++++++++++++
HELP PLEASE ... This is driving me NUTS.
Regards
Mark
I have an access 2000 database running a custom application. I have a
record management form which displays all the details for an item in the
system, (covers 4 main tables, decending in details 1 -< 2 -< 3 -< 4 >- 5 and
a lookup). The fornt end stores the code, and the backend data store is
another access 2000 db linked in.
The problem is when I use the search for another record code I've written,
it works fine for the first 7 or 8 searches, then I get an error message
Error 3000 "Reserved Error (-1104) There is no msg for this error" then
after that another message "Run Time Error 3048 Cannot open any more
databases". If I close the form and re-open it it works fine for another 7/8
hits. I don't understand it as the code to search for another record closes
the main form, opens a search form, and then reopens the main form with a new
filter.
The control code is:
+++++++++++++++++++++++++++++++++++++++++++++++
Private Sub cmdNext_Click()
On Error GoTo err1
Dim fStock As Boolean
''
' release the lock on the current ticket number
''
clearLock Me!rTicketNumber
fStock = Me!iStock
DoCmd.Close acForm, Me.Name
If fStock = True Then
stockenquiry
Else
openMgtEnquiry
End If
end_err1:
Exit Sub
err1:
MsgBox Err.Description, vbCritical, "Error No. " & Err.Number
Resume end_err1
end sub
+++++++++++++++++++++++++++++++++++++++++++++++++
The error occurs on the docmd.RunSQL line of the following function
the variable strSql contains
DELETE FROM jrmLock WHERE lRTicketNumber = 'A00008'
+++++++++++++++++++++++++++++++++++++++++++++++++
Public Function clearLock(strTicketNumber As String)
'on error goto err1
Dim strSQL As String
strSQL = " DELETE FROM jrmLock " & _
" WHERE lRTicketNumber = '" & strTicketNumber & "'"
DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
DoCmd.SetWarnings True
end_err1:
Exit Function
err1:
MsgBox Err.Description, vbCritical, "clearLock Error " & Err.Number
Resume end_err1
End Function
+++++++++++++++++++++++++++++++++++++++++++++++++
HELP PLEASE ... This is driving me NUTS.
Regards
Mark