ledgerr.rob
Registered User.
- Local time
- Today, 06:43
- Joined
- Jun 3, 2012
- Messages
- 68
Hello,
I've been working on a project that incorporates Subcontractors with a State, a region (that i define by county) and then by City. My goal is to enter information about a subcontractor, select a state and a city. Then i want to be able to query subcontractors by state/region/city. I'm close on this but I can't seem to figure out a relationship issue.
Currently i have it in my mind that a state will have many subcontractors. That state will have many regions, regions will have many counties, and counties will have many cities.
Now i have the State - Region - County - City figured out, no problem. But when i add the subcontractor into the equation i get many more records than i should ( i think a cross join is happening but i don't know).
I've attached a copy of the DB for what i have so far. To get you where i am looking, open qry1. Running it provides 1118 records. (there should be 2737). Removing tblSubcontractor provides the 2737 records (the total number of cities in the project at this time).
So i tried troubleshooting this.
1- add tblSubcontractor to qry 2 = 3 results. this is correct
2- add tblState to qry 2 = 3 results. This is still correct
3 - add tblRegion to qry 2 = 13 results. Something is wrong here
4- add tblCounty_Imports to qry 2 = 139 results. Problem is growing
5- add tblCity to qry 2 = 1118 results. Same number of results as qry 1 originally provided.
This must be a relationship error with the tblState and tblRegion but i don't know the direction i should go.
Any ideas or direction?
Thank you,
Rob
I've been working on a project that incorporates Subcontractors with a State, a region (that i define by county) and then by City. My goal is to enter information about a subcontractor, select a state and a city. Then i want to be able to query subcontractors by state/region/city. I'm close on this but I can't seem to figure out a relationship issue.
Currently i have it in my mind that a state will have many subcontractors. That state will have many regions, regions will have many counties, and counties will have many cities.
Now i have the State - Region - County - City figured out, no problem. But when i add the subcontractor into the equation i get many more records than i should ( i think a cross join is happening but i don't know).
I've attached a copy of the DB for what i have so far. To get you where i am looking, open qry1. Running it provides 1118 records. (there should be 2737). Removing tblSubcontractor provides the 2737 records (the total number of cities in the project at this time).
So i tried troubleshooting this.
1- add tblSubcontractor to qry 2 = 3 results. this is correct
2- add tblState to qry 2 = 3 results. This is still correct
3 - add tblRegion to qry 2 = 13 results. Something is wrong here
4- add tblCounty_Imports to qry 2 = 139 results. Problem is growing
5- add tblCity to qry 2 = 1118 results. Same number of results as qry 1 originally provided.
This must be a relationship error with the tblState and tblRegion but i don't know the direction i should go.
Any ideas or direction?
Thank you,
Rob