Hi for some reason I just can't code a cancel button's 'No' response to simply return to the userform the user was on when the button was clicked.
When the 'Yes' response is clicked the form closes and loads the Main form as it is meant to but if I click No then the current form also closes. The code below is what I started with but I've tried various ways to just go back to the original form.
Anyone got any suggestions please?
Thanks Paul
When the 'Yes' response is clicked the form closes and loads the Main form as it is meant to but if I click No then the current form also closes. The code below is what I started with but I've tried various ways to just go back to the original form.
Anyone got any suggestions please?
Thanks Paul
VBA Code:
Private Sub cmbCancel_Click()
MsgBox "Are you sure you want to cancel this record?" & vbCrLf & _
"If you select yes, you will lose all the information entered.", vbExclamation + vbYesNo, "Cancel Entry"
Unload Me
MainList.Show
End Sub