M
MK
hello. I've looked for an answer to this but can't find one.
I get error 2499 on my form when I click the "save" button and if the term
date field has been populated.
here is the code:
Private Sub cmdSave_Click()
On Error GoTo Err_cmdSave_Click
If Not IsNull(Me.Term_Date) And Me.Dirty Then
Call TermGroup
End If
DoCmd.GoToRecord , , acNext
Me.AllowAdditions = False
Me.AllowDeletions = False
Me.AllowEdits = False
Exit_cmdSave_Click:
Exit Sub
Err_cmdSave_Click:
If Err.Number = 3376 Then
Resume Next
Else
If Err.Number = 2499 Then
Resume next
Else
MsgBox "Error " & Err.Number & " - " &
Err.Description, , "cmdSave_Click"
Resume Exit_cmdSave_Click
End If
End If
End Sub
the function "TermGroup" does a few queries to other tables and I get no
errors on it.
I tried docmd.gotorecord, , acfirst -- but I want to go to the record I just
saved... how do I do that? and stop getting the error?
thank you so much!
MK
I get error 2499 on my form when I click the "save" button and if the term
date field has been populated.
here is the code:
Private Sub cmdSave_Click()
On Error GoTo Err_cmdSave_Click
If Not IsNull(Me.Term_Date) And Me.Dirty Then
Call TermGroup
End If
DoCmd.GoToRecord , , acNext
Me.AllowAdditions = False
Me.AllowDeletions = False
Me.AllowEdits = False
Exit_cmdSave_Click:
Exit Sub
Err_cmdSave_Click:
If Err.Number = 3376 Then
Resume Next
Else
If Err.Number = 2499 Then
Resume next
Else
MsgBox "Error " & Err.Number & " - " &
Err.Description, , "cmdSave_Click"
Resume Exit_cmdSave_Click
End If
End If
End Sub
the function "TermGroup" does a few queries to other tables and I get no
errors on it.
I tried docmd.gotorecord, , acfirst -- but I want to go to the record I just
saved... how do I do that? and stop getting the error?
thank you so much!
MK