R
rblivewire
I have a formula that adds 1 to the hightest number and this is my
autonumber. I am trying to get it to work in a multiuser environment
by using this code:
Private Sub Form_Error(DataErr As Integer, Response As Integer)
On Error GoTo Err_Form_Error
Response = IncrementField(DataErr)
Exit_Form_Error:
Exit Sub
Err_Form_Error:
MsgBox Err.Description
Resume Exit_Form_Error
End Sub
Function IncrementField(DataErr)
If DataErr = 3022 Then
Me![#] = DMax("[#]", "Tool Tracking List") + 1
IncrementField = acDataErrContinue
End If
End Function
It is supposed to trap the error and then add 1 to the number. The
code doesnt seem to trap the error. It simply gives me the error and
an ok button. Can anyone see why its not trapping the error???
autonumber. I am trying to get it to work in a multiuser environment
by using this code:
Private Sub Form_Error(DataErr As Integer, Response As Integer)
On Error GoTo Err_Form_Error
Response = IncrementField(DataErr)
Exit_Form_Error:
Exit Sub
Err_Form_Error:
MsgBox Err.Description
Resume Exit_Form_Error
End Sub
Function IncrementField(DataErr)
If DataErr = 3022 Then
Me![#] = DMax("[#]", "Tool Tracking List") + 1
IncrementField = acDataErrContinue
End If
End Function
It is supposed to trap the error and then add 1 to the number. The
code doesnt seem to trap the error. It simply gives me the error and
an ok button. Can anyone see why its not trapping the error???