Great Escape

  • Thread starter Thread starter Scott
  • Start date Start date
S

Scott

I have a form with a combo box that selects customer
records and input boxes that are filled with the customer
data once the record is selected from the combo box. If
the user types in the input box before the customer record
is selected in the combo box the user gets an error
message when trying to select a customer record from the
combo box. I've found the only way to avoid getting the
error message is to hit escape twice if the user
accidentally types in the input box. I was hoping, once
the user clicks the combo box there could be code
automatically to do the escape button twice before a
customer record is selected.

Thank you.
 
you could try adding the following code to the combo box's Enter event, as

Me.Undo

but it might be a better idea to fix the problem that is causing the error
message, rather than just trying to avoid it. sometimes a seemingly
"unexplained" problem that shows up in one place is indicative of an
underlying design or coding flaw.

suggest you post a bit more detailed explanation of how your form works and
when the error message appears, including the code that is running at the
time.

hth
 
Back
Top