D
Darhl Thomason
I would like to have a combo box based on another combo box on my form. In
my tables, I have a Region table with two Regions; I have a District table
with 5 districts. Table structure is:
tblRegion
RegionID RegionName
1 Western
2 Central
tblDistrict
DistrictID DistrictName RegionID
1 Mountain 2
2 Northern Plains 2
3 Pacific 1
4 NorthWest 1
5 MidWest 2
What I want is to have the Region combo box control what shows in the
District combo box. For example, if I select the Western Region, I only
want the Pacific and NorthWest Districts to show. And if I select the
Central Region, I only want the Mountain, Northern Plains and MidWest
Districts to show.
The RowSource for the Region combo box is:
SELECT tblRegion.RegionID, tblRegion.RegionName FROM tblRegion ORDER BY
tblRegion.RegionName WITH OWNERACCESS OPTION;
The RowSource for the District combo box is:
SELECT tblDistrict.DistrictID, tblDistrict.DistrictName FROM tblDistrict
ORDER BY tblDistrict.DistrictName WITH OWNERACCESS OPTION;
My DB is programmed in VBA and is an Access2003 file format.
Thanks!
Darhl
my tables, I have a Region table with two Regions; I have a District table
with 5 districts. Table structure is:
tblRegion
RegionID RegionName
1 Western
2 Central
tblDistrict
DistrictID DistrictName RegionID
1 Mountain 2
2 Northern Plains 2
3 Pacific 1
4 NorthWest 1
5 MidWest 2
What I want is to have the Region combo box control what shows in the
District combo box. For example, if I select the Western Region, I only
want the Pacific and NorthWest Districts to show. And if I select the
Central Region, I only want the Mountain, Northern Plains and MidWest
Districts to show.
The RowSource for the Region combo box is:
SELECT tblRegion.RegionID, tblRegion.RegionName FROM tblRegion ORDER BY
tblRegion.RegionName WITH OWNERACCESS OPTION;
The RowSource for the District combo box is:
SELECT tblDistrict.DistrictID, tblDistrict.DistrictName FROM tblDistrict
ORDER BY tblDistrict.DistrictName WITH OWNERACCESS OPTION;
My DB is programmed in VBA and is an Access2003 file format.
Thanks!
Darhl