MsgBox Question

D

Don

Hopefully a very simple question.

I have no trouble coding a message box in the Before Update Event Property
to return a response for one button, but I cannot seem to code multiple
responses. For instance, if the information typed into a text box is
incorrect, I can program the msgbox to undo the information and set the focus
back to the blank textbox; however, if I want to give the user the opiton to
cancel and close the form, I can't get the form to simply close. Instead,
the AfterUpdate Event Property for the textbox initiates.

Any help would be appreciated.
 
B

BruceM

Try adding:
Me.Undo
before exiting the form. This will clear unsaved data, so that the text box
does not update.
 
D

Don

Thank you for your help, but that's not exactly what I'm looking for. I have
a message box with 2 buttons: retry and cancel. When I click the retry
button, I want the text box in the form to be emptied and the focus to return
to it; when I press the cancel button, I want my form to close.

I can get the retry button to work, but I can't get the cancel button to
work.

I could use some direction. Thanks...
 
B

BruceM

I was away for a week, which is why I haven't replied.

When asking about code it is helpful to post the actual code. When the
user clicks the Cancel button, do you want to clear the text box along with
any other new information in the record, or what exactly?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top