searching for a product number

viperstingray

Registered User.
Local time
Today, 11:27
Joined
May 31, 2005
Messages
87
I have been away from access for a while now and I am sure that this is simple. I tried a search but found nothing.

The issue:
A)The user enters in a product number, if not found then a message appears to tell them so...this I know how to do
B)If the product is in the table then I would like it to display some of the fields on the form.
EX: Prd # 0659875
MSG = does not exist

ExB) prd #: 0584785
Reason No.:1
Description: abcdefg hijklm nopqr stuvwxyz

So the whole this is how do I populate the text boxes that display the fields with the proper searched critera (prd. no.)

Thanks,
viper
 
find number

Assuming your product number field is in a combo box and it's record source uses a query with reason, description, etc.. ...
If the product number is found then in the after update field of that combo box you could do something like this...

me.thereasontextbox=me.comboname.column(2)
me.thedescription=me.comboname.column(3)


etc...


Remember that the first column is actually me.comboname.column(0)

If you are not using a combo box then you could use a sql statemnet in the after update field of the part number text box to find the part number and associated reason, description, etc...

Hope this helps because I am off to the local Sports Bar.
 
Well, it was important to know but the problem is that the user enters in a product number. Is there a way i can get it to query and then spit out the quried fields into text boxes back on the main form...?
 
Build a new form with wizards fully enabled. There is a combo-box wizard that allows you to use the input of the combo box to select a given record. See what VBA code it built for you and figure out how to incorporate that into your actual form.

Be aware that you face a dichotomy if you also want to update from that form. Because the boxes that support your lookup will ALWAYS want to support your lookup, not support an update. If this is a lookup-only form then you should have no big issues.
 

Users who are viewing this thread

Back
Top Bottom