Combo Box

J

Jodi

We have a customer name in a combo box. When we select
it, how can we get the address, phone and etc. to fill
into a text box on a form?
 
G

Gerald Stanley

It is a two-stage process

Stage 1 is to change the comboBox RowSource SQL to include
the additional columns that you require. You will also
need to change the ColumnCount to match the new Select
statement.

Stage 2 is to code the comboBox's AfterUpdate eventhandler
to populate the text boxes. This is done by referencing
the comboBox's Columns (zero-based) collection.

For example, if the RowSource SQL was SELECT customerName,
customerPhone .... FROM ....., then the code to poulate a
text box with the customerPhone would be txtPhone.Value =
cmvCustomer.Column(1).

Hope This Helps
Gerald Stanley MCSD
 

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