Combo Box

  • Thread starter Thread starter Jodi
  • Start date Start date
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?
 
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
 
Back
Top