Look-up field on form

  • Thread starter Thread starter Jason Spence
  • Start date Start date
J

Jason Spence

I have a form that has a space for Name, Address, etc.
and a space for "code" , now I would like to be able to
type in a set code and have the table/form fill in the
name address etc. So if I type in ABC123 in the CODE
field on the form, I want the address fields for ABC123
to automatically fill in below that on the form.
 
I have a form that has a space for Name, Address, etc.
and a space for "code" , now I would like to be able to
type in a set code and have the table/form fill in the
name address etc. So if I type in ABC123 in the CODE
field on the form, I want the address fields for ABC123
to automatically fill in below that on the form.

Look up from... where?

Are you attempting to store the address redundantly, copying it from
one table into another table? If so... DON'T! You should enter this
information ONLY ONCE. The table upon which this form is based should
have a field for the code but should *not* have redundant fields for
name, address, etc.

Instead, use a Combo Box based on the lookup table storing the code.
You can include up to ten fields (the name, address, etc.) in the
combo box's row source query; on the Form you can have textboxes with
their Control Source set to

=cboCode.Column(n)

where cboCode is the name of the combo box and (n) is the *zero based*
subscript of the field in the combo.
 
Back
Top