J
Joxk via AccessMonster.com
I have the following code in the Before Update even of a form which I have
take from the threads on this site:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Do you wish to save and proceed to the supplementary questions?
", vbYesNo) = vbNo Then
Cancel = True
Me.Undo
MsgBox "Entery has been cancelled", vbOKOnly + vbInformation
DoCmd.SetWarnings False
End If
End Sub
What I wish to do is amend it so that if the user clicks “No†on the message
box the records aren’t saved and the form simply closes. However if the user
clicks “Yes†I would like the record saved, the form to close and a new form
open.
I have tried creating a macro that launches the next form when the inital one
closes, however the next form opens whether the user click "yes" or "No"
I’m not so good with code, so any help is really appreciated
take from the threads on this site:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Do you wish to save and proceed to the supplementary questions?
", vbYesNo) = vbNo Then
Cancel = True
Me.Undo
MsgBox "Entery has been cancelled", vbOKOnly + vbInformation
DoCmd.SetWarnings False
End If
End Sub
What I wish to do is amend it so that if the user clicks “No†on the message
box the records aren’t saved and the form simply closes. However if the user
clicks “Yes†I would like the record saved, the form to close and a new form
open.
I have tried creating a macro that launches the next form when the inital one
closes, however the next form opens whether the user click "yes" or "No"
I’m not so good with code, so any help is really appreciated