Hi Fred,
Ok I'm assuming you've already set up 3 tables for this, e.g.
TblSalesPeople, TblTerritories and TblSalesPeoplesTerritories...
for the purpose of this, i will assume the following fields are set up for
these tables;
TblSalesPeople
----------------
lngID Type: Number (AutoNumber if you wish) PrimaryKey
SalesPersonName Type: Text
TblTerritories
---------------
lngID Type: Number (AutoNumber if you wish) PrimaryKey
TerritoryName Type: Text
TblSalesPeoplesTerritories
----------------------------
lngSalesPersonID Type: Number Composite Primary Key
lngTerritoryID Type: Number Composite Primary Key
Create a new query called QrySelectedSalesPersonsTerritories with the
following SQL
SELECT TblTerritories.TerritoryName
FROM (TblSalesPeople INNER JOIN TblSalesPeoplesTerritories ON
TblSalesPeople.lngID=TblSalesPeoplesTerritories.lngSalesPersonID INNER JOIN
TblTerritories ON
TblSalesPeoplesTerritories.lngTerritoryID=TblTerritories.lngID
WHERE (((TblSalesPeople.lngID)=Forms!FormNameHere!Combo1NameHere))
Note: you will need to replace 'FormNameHere' and 'Combo1NameHere' from the
above with whatever names you've called them in your database.
For the two combo boxes on the form;
----------------------------------------
Combo 1: RowSource = TblSalesPeople
Combo 2: RowSource = QrySelectedSalesPersonsTerritories
Now after the user selects an item from Combo1, you will need to refresh
Combo2, there are a few ways of doing this, I would probably use the
'OnChange' event for the combo1 and enter the following VBA statement;
Me.Combo2NameHere.Requery
Hope this helps,
Wayne Phillips
http://www.everythingaccess.com