What you need are called "Cascading combo boxes"
Basically: for your company combo be sure to include the company id
then when SomeCompany is selected from that combobox use that company id to filter your contacts combo. I generally use the AfterUpdate event of the primary combo box.
It'll look something like this:
Code:
Private Sub Form_Load()
cbo_Company.RowSource = "SELECT CompanyID, Company_Name " _
& "FROM tbl_Company " _
& "ORDER BY Company_Name;"
End Sub
Private Sub cbo_Company_AfterUpdate()
If Not isNull(cbo_Company) Then
cbo_Contact.RowSource = "SELECT Contact_ID, Contact_Name " _
& "FROM tbl_Contact WHERE Company_ID = " &clng(cbo_Company.Column(0)) _
& " ORDER BY Contact_Name;"
End If
End Sub
You'll need to use your table/field names, but, the code above should get you in the right direction. As usual I'm assuming your ID field is a Long Integer (autonumber). If it's not you'll need to modify the cbo_Contact rowsource string to format the ID properly.
Also, you'll notice the space between the leading quotes and ORDER in the contact rowsource...very important, otherwise Access will concatenate your ID with the word ORDER...which doesn't work...no matter how many times I attempt it<g>
Sam, hth