Based on a combo box selection

R

Raashid

I'm using Access and I need to figure out how to display
the record details based on a combo box selection. For
example, when I select a CustomerID in a combo box, how do
I get the related customer name and address information to
appear?

Regards
Raashid
 
J

Jeff Boyce

Raashid

One way to do this is to create a query of the underlying table that holds
the name/address info. As a criterion in that query, use an expression to
point to the combo box in the form for the CustomerID parameter value,
something like:

Forms!YourFormName!cboYourComboBoxName

Base the form on the query.

Make sure the combo box is NOT bound to the CustomerID data field. Make
sure the combo box does NOT have a default value.

In the AfterUpdate event of the combo box, requery the form with something
like:

Me.Requery
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top