Combo Box selection populating other fields automatically...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I set up a combo box with the names of Vendors and want to populate the
ADDRESS, CITY, STATE, ZIP, PHONE... when a vendor is selected in the combo
box. I can get the first field to populate but not the rest, can anyone tell
me why?
 
Ujak,

If you got the first one to update then you must be on the right track...
how are you doing it?

There are several ways to do it, involving macros, VB code or none of those,
just a form design trick! Here's the trick:
Modify the RowSource query of the combo to return all the required fields in
the vendors table, not just the name (I assume that's what you currently
have). If you want to only show the name in the combo, all you have to do is
set the width of the other columns to 0 in the combo's Column Width
property.
This done, set the control source property of the text boxes to display the
rest of the data to:
=[ComboName].Column(1)
=[ComboName].Column(2)
etc

HTH,
Nikos
 
Back
Top