filling a 3 textboxes from combobox

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
i have a combobox (CustomerID). When the Customer ID is selected i want the
Name, Address, and Phone number of the customer to be displayed in 3
different textboxes. All of this information is stored in a table Customers.
The CustomerID comes from table Sales, but this is queried from Customers.

Could someone please give a detailed (i.e. step by step (becos im new 2
Access and visio) description on how to do this.

Your help is very thanked.
 
Two ways to do it:

1. a. Include the Name, Address, and Phone Number fields in the RowSource
of the combo box. Something like:

SELECT Customers.CustomerID, Customers..CustomerName, Customers.Address,
Customers.PhoneNumber FROM Customers;

b. Set the last ColumnWidth property to 0" for the last three columns so
that they don't display in the drop-down list

c. Use the combo box' Column property to display a column in a textbox. Set
the textbox' ControlSource to:
=YourComboBoxName.Column(x), where x is the column number, starting with 0.

2. Include these three fields in a query, joined by the CustomerID, and all
the fields from the many side. Do not include the CustomerID from the
Customer table, but rather on the many side. Use the query as the form's
RecordSource.

Sprinks
 
Back
Top