link two fields on a form

  • Thread starter Thread starter FL
  • Start date Start date
F

FL

How can I link two fields on a form. Example: I have a drop down list
(combo box) for Product Description and another field with a drop down list
(combo box) which shows the Product ID number. I want to select the Product
Description from one list and have the Product ID show up in the other field
list automatically. Each Product Description has a unique Product ID.
Records may show the same Product Description and Product ID or different
ones.

Any idea how to link these two fields on my form?
 
Rather than use two comboboxes, consider using a single combobox (?to select
Product Description) and having an unbound textbox display the ProductID
belonging to that product.

In the query that feeds your (single) combobox, include both description and
id fields.

In the AfterUpdate event of the combobox, include something like:

Me!txtProductID = Me!cboProductDescription.Column(1)

where .Column() is zero-based ... start counting columns in the query at "0"

Good luck

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top