Link to home
Start Free TrialLog in
Avatar of Mrdogkick
Mrdogkick

asked on

Simple search function in access?

Hi, I have a form that has boxid and boxbarcode text boxes. When i use the controls at the bottom it scrolls through the records correctly. What I'm looking for is to lock the boxbarcode box and have the boxid box open so you can search for any string of letters and hit a button and it will fill in the corresponding barcode to that box in the boxbarcode box if the search string is correct. Sorry for the repeated use of the word box, I hope that made some sense!
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

You cannot use the same control for data entry and for searching for records in the form.
If you want to search then you must have separate controls - in the form header say.

You can use an unbound form and do the search, or you can lookup corresponding values during data entry (of new records or to modify records)  
Avatar of Mrdogkick
Mrdogkick

ASKER

Sorry, I really didn't understand any of that! Please could you elaborate?
If your form is a data entry form, where you normally save records into a table or you are viewing records in the form, you cannot use the same boxes (controls) to search for records.

You have to use different controls (boxes) to enter your search values and then run some code to find the
record(s) that match your search values.
ok, so could you let me know how to do that or if you know of an easy-to-follow example...
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial