A
a235728
After updating a record and then navigating to another record via the
navigation buttons, I want to check to make sure that the user completed the
required fields before I allow them to change records. The problem is that
when I click on one of the navigation buttons, it then goes through this
event below and if it is good and saved, it doesn't change records. I'm
assuming, because I'm changing the focus to a control and it doesn't know to
change records after this code.
I just want it to continue to change records if it saves.
Here is the code:
If MsgBox("Changes have been made to this record." _
& vbCrLf & vbCrLf & "Do you want to save these changes?" _
, vbYesNo, "Changes Made...") = vbYes Then
If Len(cboprovider.Text) = 0 Then
MsgBox "Make a selection for Provider", vbOKOnly, "Provider Error"
Cancel = True
Exit Sub
End If
Else
DoCmd.RunCommand acCmdUndo
End If
Thanks
Stephen Shepherd
navigation buttons, I want to check to make sure that the user completed the
required fields before I allow them to change records. The problem is that
when I click on one of the navigation buttons, it then goes through this
event below and if it is good and saved, it doesn't change records. I'm
assuming, because I'm changing the focus to a control and it doesn't know to
change records after this code.
I just want it to continue to change records if it saves.
Here is the code:
If MsgBox("Changes have been made to this record." _
& vbCrLf & vbCrLf & "Do you want to save these changes?" _
, vbYesNo, "Changes Made...") = vbYes Then
If Len(cboprovider.Text) = 0 Then
MsgBox "Make a selection for Provider", vbOKOnly, "Provider Error"
Cancel = True
Exit Sub
End If
Else
DoCmd.RunCommand acCmdUndo
End If
Thanks
Stephen Shepherd