Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dependent combo box in sub form

Status
Not open for further replies.

rony01

MIS
Sep 12, 2012
8
US
hello friends
I am to ms access . I have a table with three columns ID, Fname , Lname . I have created a form in designer with sub form with three combo boxes bound to that table. I want to populate Fname , Lname when I select ID field . I have placed the query into row source of a combo box When I click the drop down arrow it just shows both columns .

SQL:
  SELECT Fname & "" & Lname FROM Table1 ORDER BY Fname, Lname;

Can someone tell me how to do this?
Thanks
 
It would be good if you explained your table structures. Typically first and last names should be stored in only one record in only one table. Your question implies you are attempting to store this information in more than one table.

You can display the first and last names based on the selection of the id value using the Column() property.

Assuming combo box [cboID] with a row source of
SELECT ID, FName, LName FROM Table1 ORDER BY FName, LName;

To display the first name use a text box with this control source
=cboID.Column(1)

To display the last name use a text box with this control source
=cboID.Column(2)



Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top