Search Help!

Goingcrazy

Registered User.
Local time
Today, 04:16
Joined
May 5, 2008
Messages
23
Hi,
I'm really new to vba so any help with this would be great.
I Have a form used to enter information about equipment. on the form i have the ID that our company uses called LCUID and what i would like to be able to do is add an unbound text box to the form so that the user can type in the LCUID they need to look up and the form goes to that record. I have seen a lot of different things on this and i am getting more confused. If anybody has any simple advice or help on this that would be awesome.
 
Instead of using a text box, create a combo box, using the wizard and one of the options is to find a record based on the selection. Also that way your users don't have to know each number they can just select it, or start to type it in to select it.
 
It all depends how the database works in its current setup, how you want it to look etc.

Assuming that the form displaying your records is based on a query you could make it a paramater query.
 
bob,
Thanks so much that did it! :D however I was also curious as to whether or not i could get the combo box to not show anything after the record is found?
 
bob,
Thanks so much that did it! :D however I was also curious as to whether or not i could get the combo box to not show anything after the record is found?

I don't think you can because if you change it, the code will go try to find anything that matches. But you could try in the After Update event of the combo box - at the end of it to set it:

Me.YourComboBoxName = Null

don't know if that will work or not, but you can try.
 
That did work. As long as the user hits enter it clears it out. Thanks so much
 

Users who are viewing this thread

Back
Top Bottom