Below is my code for a 'save' button. It works except for one element, When I click the button the message appears as expected, then saves the record as directed but when it returns to the form it goes to the first record?
How do I direct it to return to the original record that was being edited?
Code:
Private Sub cmd_Save_Click()
Dim Response, Msg, Style, Title
Msg = "Once Saved Contact will be read-only to edit again you must click edit or click no to continue editing Contact"
Style = vbYesNo
Title = "Saving?"
If (Me.Dirty = True) Then
Response = MsgBox(Msg, Style, Title)
If Response = vbYes Then
Me.Dirty = False
Else
Me.Undo
End If
End If
Me.C_Salutation.SetFocus
Me.AllowEdits = False
Me.DataEntry = False
Me.AllowAdditions = True
End Sub
How do I direct it to return to the original record that was being edited?