need code to clear texbox

JSDART!!

Registered User.
Local time
Today, 13:58
Joined
Mar 12, 2004
Messages
31
I have built a form that has a listbox driven by a query.
query asks for last name the list box displays a list of first last and customer numbers.
the design is such that you click on one of the customers and then on a button that opens that customers record.
to accomplish this I added a text Box that hold the customer number once the customer has been selected on the list.
this works good the issue is that the text box holds the last customer number so when I re-query the form opens and the list box does not have a customer selected yet but the text box is holding the last customers number.

I am racking my brain trying to figure how to clear the test box so It open blank until you select a customer from the list box..

Any suggestions

thanks
J
 
If the textbox is called Text0, the VBA code would be:
Code:
Me.Text0=""
You may want to put that into the form's Current event, so it gets refreshed any time you move to a different record.
 
on the change event of your combo box
txtbox.txt = ""
 

Users who are viewing this thread

Back
Top Bottom