I have two Tables: Plans and Tracking. One field in common for these tables, Plans.ID = Tracking.PlanID. Each plan has multiple years of tracking. So plan01 has one row of data in Plans and has multiple years of data in Tracking.
OK, when selecting which plans to view on a form, the user can select criteria based upon fields in both tables.
I am not sure if I need to join these tables temporarily to handle the WHERE clause.
User selects:
ADMIN = Joe Blow
Year = 2003
Criteria1 = True
Criteria2 = True
Criteria3 = False
ADMIN is a field in Plans. Year, Criteria1, Criteria2, and Criteria3 are fields in Tracking.
The result of the criteria search is all of the data in Plans where data in the fields Plans.ADMIN, Tracking.Year, Tracking.Criteria1, Tracking.Criteria2 and Tracking.Criteria3 match the options the user selected.
I am looking for the SQL syntax to provide the desired search results. Any help would be appreciated.
Cheers,
Jason
OK, when selecting which plans to view on a form, the user can select criteria based upon fields in both tables.
I am not sure if I need to join these tables temporarily to handle the WHERE clause.
User selects:
ADMIN = Joe Blow
Year = 2003
Criteria1 = True
Criteria2 = True
Criteria3 = False
ADMIN is a field in Plans. Year, Criteria1, Criteria2, and Criteria3 are fields in Tracking.
The result of the criteria search is all of the data in Plans where data in the fields Plans.ADMIN, Tracking.Year, Tracking.Criteria1, Tracking.Criteria2 and Tracking.Criteria3 match the options the user selected.
I am looking for the SQL syntax to provide the desired search results. Any help would be appreciated.
Cheers,
Jason