Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

automatically populate fields (PLEASE HELP, I'm going crazy)

Status
Not open for further replies.

smille777

Technical User
Jun 27, 2004
43
US
Hi Everybody. I am fairly new to ACCESS programming.

I need to be spared from my lack of knowledgs and lingering headache from trying to figure this out:

I have a table "Product Info" which lists "Product ID", "MFR Part Number" and "Manufacturer."

I have created a form, "Customer Requirements", which has a combo box labeled MFR Part Number and lists "MFR Part Number and Manufacturer."

MY QUESTION: When I select a "MFR Part Number" from the combo box, how can I auto populate another box with the corresponding "Manufacturer."

Thanks too much!
 
Take a look at the Column property of the ComboBox object.
You may try something like this in the AfterUpdate event procedure of your [MFR Part Number] combo:
Me![name of control to populate] = Me![MFR Part Number].Column(1)
provided that Manufacturer is the second column of the combo.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks PH, This did mot seem to work. I don't want to waste your time, so I'll go do some research.
 
Try setting the row source of the Manufacturer control to a query using the Mfr Part Number as a parameter and resulting in the Manufacturer.

Also use the Lost Focus event of the Mfr Part Number control to requery the Manufacturer.

Now, as focus moves from the Mfr Part Number control to the Manufaturer control the contents of the second control will reflect the contents of the first as a result of the query.

This is a little easier to understand when just getting into events and form properties. Hop it helps.
 
PH and CaptGeek:

Thank you, both, very much!

I was able to get it to work with your advice!!! I am trying to learn as much as possible by reading posts and technical articles, but your fedback saved me a lot of Trial & Error.

Thanks again!!

Scott
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top