mcdhappy80
Registered User.
- Local time
- Today, 20:03
- Joined
- Jun 22, 2009
- Messages
- 347
Determining which control triggered forms before update event
I have this code in the forms before update event:
I have this command in several controls on form:
Can I, and how find out which of these controls triggered before update event in the before update event, and then act accordingly?
Thank You
I have this code in the forms before update event:
Code:
If Not (Me.NewRecord) Then
If MsgBox("Do You wanna save changes on this record?", vbQuestion + vbYesNo + vbDefaultButton1, "Saving changes?") = vbNo Then
Me.Undo
End If
Else
If MsgBox("Do You wanna save this new record?", vbQuestion + vbYesNo + vbDefaultButton1, "Record saving?") = vbNo Then
Me.Undo
End If
End If
Code:
DoCmd.RunCommand acCmdSaveRecord
Thank You
Last edited: