Link to home
Start Free TrialLog in
Avatar of Computer_Support_Norwich
Computer_Support_NorwichFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Actioning vbNo ad well as vbYes on msgbox.

This is probably quite simple but looking for some guidance. This code works fine and just cancels a given action if the user presses No on the msgbox:

If MsgBox("This quotation will be cancelled and you will be unable to convert it to an an order, nor will it appear on the quotations list. Do you want to continue?", vbQuestion + vbYesNo, "GBIS") = vbYes Then
    Me.orderstatus.Value = "Cancelled"
    MsgBox "This quotation has been cancelled. This screen will now close.", vbInformation, "GBIS"
    DoCmd.Close
    End If
    
GoTo lastline

Open in new window


I want to add something like:

if vbno then me.textbox.value = ""

Just to clear out a text box and abort the actions which are taken when yes is pressed.

All help appreciated.
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Rgonzo1971
Rgonzo1971

@mbizup

by vbYesNo the Cancel "X" button is disabled no need to implement an else case

Regards
Avatar of Computer_Support_Norwich

ASKER

mbizup.... right on the money, thanks.