I have a little problem with a msgbox. I have predefined the style like this:
I defined the next code, to give the commands to each button on the msgbox, but it doesn;t work properly.
If you enter vbNO, it will trigger the vbCancel command, if I change the code for vbCancel and vbNo, turn them around, then it will do on both the vbNo command. How can I fix this??
PHP:
Style2 = vbYesNoCancel + vbQuestion + vbDefaultButton1
I defined the next code, to give the commands to each button on the msgbox, but it doesn;t work properly.
If you enter vbNO, it will trigger the vbCancel command, if I change the code for vbCancel and vbNo, turn them around, then it will do on both the vbNo command. How can I fix this??
PHP:
'If OK, then save reservation, and say reservation is successful'
If MsgBox(Msg2, Style2, Title2) = vbYes Then
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
MsgBox Msg3, Style3, Title3
ElseIf vbCancel Then
'Otherwise, delete reservation, and say reservation is cancelled'
DoCmd.DoMenuItem acFormBar, acEditMenu, acUndo, , acMenuVer70
cmbResPersID.SetFocus
MsgBox Msg5, Style5, Title5
'Go to check 3PM availability'
ElseIf vbNo Then
If MsgBox(Msg4, Style4, Title4) = vbOK Then
'E9AMAdv3PMLess6'
End If
End If