T
Tony Williams
Thanks to Graham Seach I have my message box with Yes and No buttons. When
a user enters a new record they wanted a prompt that asks if they were sure
the record should be saved. This is the code I have in the Before Update
property of my form
If Me.NewRecord Then
Cancel = (vbNo = MsgBox("Are you sure you want to save this new record?",
36))
End If
However what I would like to do is this; if the user clicks on Yes I want
this to happen
If Me.NewRecord Then
Populate_URN
End If
DoCmd.Requery "Docnumtxt"
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
If the user Clicks on No I want this to happen
Me.Undo
in other words I want the form to be cleared and the record not saved.
How do I trap the yes and No answers?
TIA
Tony Williams
a user enters a new record they wanted a prompt that asks if they were sure
the record should be saved. This is the code I have in the Before Update
property of my form
If Me.NewRecord Then
Cancel = (vbNo = MsgBox("Are you sure you want to save this new record?",
36))
End If
However what I would like to do is this; if the user clicks on Yes I want
this to happen
If Me.NewRecord Then
Populate_URN
End If
DoCmd.Requery "Docnumtxt"
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
If the user Clicks on No I want this to happen
Me.Undo
in other words I want the form to be cleared and the record not saved.
How do I trap the yes and No answers?
TIA
Tony Williams