military donut
asked on
vbYes and vbNo, either way not working
hello,
I am having another rough day.
I have this code and can't seem to get it to work...whether you push yes or no it returns to the form and does nothing...
If Me.Dirty Then
MsgBox "You must either finish the record or cancel the record, Do you want to cancel this record?", vbYesNo
If response = vbYes Then
Me.Undo
DoCmd.OpenForm "frmLicense"
Else
If response = vbNo Then
Exit Sub
End If
End If
Else
DoCmd.OpenForm "frmLicense"
End If
what am I missing?
I am having another rough day.
I have this code and can't seem to get it to work...whether you push yes or no it returns to the form and does nothing...
If Me.Dirty Then
MsgBox "You must either finish the record or cancel the record, Do you want to cancel this record?", vbYesNo
If response = vbYes Then
Me.Undo
DoCmd.OpenForm "frmLicense"
Else
If response = vbNo Then
Exit Sub
End If
End If
Else
DoCmd.OpenForm "frmLicense"
End If
what am I missing?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
MsgBox "You must either finish the record or cancel the record, Do you want to cancel this record?", vbYesNo
>>>
response = MsgBox "You must either finish the record or cancel the record, Do you want to cancel this record?", vbYesNo
>>>
response = MsgBox "You must either finish the record or cancel the record, Do you want to cancel this record?", vbYesNo
ASKER
AHHH....I gotcha
If MsgBox( "You must either finish the record or cancel the record, Do you want to cancel this record?", vbYesNo) = vbYes Then
or
Dim intRet as integer
intRet = MsgBox ("You must either finish the record or cancel the record, Do you want to cancel this record?", vbYesNo)
If intRet = vbYes Then
Jim.