Auto fill text box's

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

Guest

what is the event procedure code for auto filling text box's after you select
an item from a combo box? For example i have about 3000 employee id's in the
combo box(selecting from a query) and after i select one , i would like all
of the other text boxs(first name, last name, address, etc) to auto populate
based on the employee id. i know this is an afterupdate event. thanks, can
anyone help?
 
You didn't indicate whether the form is bound to the table directly or to a
query, or not bound.

If bound to the table, you could use filtering to get the selected record.

If bound to a query, you could modify the query to use the selected combo
box ID and load only the selected record in the form.

If not bound at all, one way would be to include all desired fields in the
query underlying the combo box, and, in the cboYourComboBox_AfterUpdate
code, set the values of the non-bound text fields to the various columns of
the combo box ... something like:

Me!txtMyTextBox = Me!cboYourComboBox.Column(1)
 
Back
Top