new record function getting locked in place
Hi folks,
I must have rebuilt this particular access 2000 database a dozen times now. For some reason I cannot fathom, the new record counter is regularly getting locked as on when the open form with link criteria is used.
The form has worked fine in the past and for weeks on end and then suddenly this crops up again.
This is the code that is currently there behind the open record button:
Private Sub btnopeninspect_Click()
On Error GoTo errorhandler
gstrcallingform = Me.Name
btnclick = True
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmfileinspect"
stLinkCriteria = "[inspectid]=" & Me![txtinspectid]
DoCmd.openform stDocName, , , stLinkCriteria
exitop:
Exit Sub
errorhandler:
generalerrorhandler Err.Number, Err.Description, fsmor, "btnopeninspect_click"
Resume exitop
Resume
End Sub
As you can see nothing special. However when a break is put in and the path followed, for the checks for new record in form_load, it displays new record value is -1 and therefore follows through the rest of the path correctly.
My question is how the heck is this happening and how the heck do I stop it.
|