Auto Fill

  • Thread starter Thread starter Turk Ries
  • Start date Start date
T

Turk Ries

Could someone please give guidance on how to make a combo box fill in
multiple fields.

I have a form with a combo box and I have figured out how to make it fill in
a field on that same form. I need it to fill in multiple fields.

For example, if I select a family members name, I want it to fill in the
address field, the city field, etc.

Thank you.
 
Assuming you've got a multi-column combo box, you can put code similar to
the following in the combo box's AfterUpdate event:

Private Sub MyCombo_AfterUpdate()

Me!Text1 = Me!MyCombo.Column(1)
Me!Text2 = Me!MyCombo.Column(2)

End Sub

That will put the contents of the second column of the currently selected
row of the combo box into control Text1, and the contents of the third
column of the currently selected row of the combo box into control Text2.
(The Column collection starts numbering at 0)
 
Back
Top