eirman
Registered User.
- Local time
- Today, 04:42
- Joined
- Aug 16, 2013
- Messages
- 38
I'm using this stardard piece of code on a button that deletes a record from a simple continuous contact form.
If the form is called "CONTACTS" with a field called "Contact_Name", what code do I use to have the relevant Contact_Name appear in the MsgBox to be sure that I'm deleting the correct record ...... something like this .....
Do You Want To Delete The Record Called Paul Quinn ?
Code:
If MsgBox("Do You Want To Delete This Record?", vbQuestion + vbYesNo + vbDefaultButton2, "Delete?") = vbYes Then
DoCmd.RunCommand acCmdSelectRecord
DoCmd.RunCommand acCmdDeleteRecord
End If
Do You Want To Delete The Record Called Paul Quinn ?