Combo Boxes

  • Thread starter Thread starter DW
  • Start date Start date
D

DW

Hello - I have two combo boxes. The first is for account
number and the second is for account name. I want the
ability to pick a account number and have account name
combo box populated with corresponding account name. I
also want it to work in reverse. i.e Pick an Account name
and the corresponding account number is populated in
account number combo box. Can anyone help me with this.
Thanks in Advance
DW
 
2 combo boxes; cmbAccountNumber and cmbAccountName

1. Set the RowSource SQL for cmbAccountNumber to "SELECT
{yourAccountNumberColumn} , {yourAccountNameColumn} FROM
{yourTable}"
2. Set the RowSource SQL for cmbAccountName to "SELECT
{yourAccountNameColumn} , {yourAccountNumberColumn} FROM
{yourTable}"
3. For both set the Bound Column to 1 and the Number of
Columns to 2.
4. In cmbAccountNumber's AfterUpdate eventhandler, put in
cmbAccountName = cmbAccountNumber.Column(1)
5. In cmbAccountName's AfterUpdate eventhandler, put in
cmbAccountNumber = cmbAccountName.Column(1)

Hope This Helps
Gerald Stanley MCSD
 
Thanks A lot
-----Original Message-----
2 combo boxes; cmbAccountNumber and cmbAccountName

1. Set the RowSource SQL for cmbAccountNumber to "SELECT
{yourAccountNumberColumn} , {yourAccountNameColumn} FROM
{yourTable}"
2. Set the RowSource SQL for cmbAccountName to "SELECT
{yourAccountNameColumn} , {yourAccountNumberColumn} FROM
{yourTable}"
3. For both set the Bound Column to 1 and the Number of
Columns to 2.
4. In cmbAccountNumber's AfterUpdate eventhandler, put in
cmbAccountName = cmbAccountNumber.Column(1)
5. In cmbAccountName's AfterUpdate eventhandler, put in
cmbAccountNumber = cmbAccountName.Column(1)

Hope This Helps
Gerald Stanley MCSD
.
 
Back
Top