Bound column in drop-down on form

D

Doug Souders

I have just two fields (Customer ID and Customer Name) as
the lookup for a drop-down on a form. The Customer ID is
bound to the Control on the form. But, I want the
Customer name to show in the drop-down and be able to use
the keys to find the customer in the list- so if I type
Sou... the list automatically goes to the Sou values of
the Customer list. But, after selecting the name I need
the Customer ID to display. Is this possible? I've tried
everything. Thanks in advance.
 
C

Cheryl Fischer

Hello Doug,

To display the Customer ID, just create an Unbound Text Box on your form.
Call it, for example, txtCustID, and set its Enabled property to False, so
that it cannot be inadvertently edited.

Then, in the AfterUpdate event of your ComboBox, insert the following:

Me!txtCustID = Me!MyComboBox.Column(0)


hth,
 

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