How do I clear a field after leaving it?

SomeGuy

Registered User.
Local time
Today, 13:57
Joined
Sep 26, 2000
Messages
62
My main form that has a combobox that searches for records. When I search for one and then leave the combobox, the title I was searching for still remains in the combobox. I would like it to remove the title OnExit but I am not sure what command to use.

Why do I want to do this? When I go to do a second search (or a third or fourth, etc), I have to take the mouse and highlight the old search item before I can start typing in a new search item. Big pain in the butt.

I thought about the Undo command but if a title was entered and then another search was done, the undo will put the old title back in.
 
Try this:

Private Sub cboPendDate_Exit(Cancel As Integer)

cboComboBoxNameGoesHere.Text = ""

End Sub

This will clear it out when you leave the control - not sure if that's what you want or not....
 
Thanks
smile.gif
 

Users who are viewing this thread

Back
Top Bottom