A
Access::Student
Hey, I've run into the fairly common "SQL too complex" error but I'm not sure
qhat I'm doing wrong. My SQL is the following:
SELECT SUBMISSIONS.title, SUBMISSIONS.timing, SUBMISSIONS.activity,
SUBMISSIONS.vote_1, SUBMISSIONS.vote_2, FINANCIALS.*, [Financial
Totals].amount_approved
FROM (SUBMISSIONS INNER JOIN FINANCIALS ON SUBMISSIONS.kp_submissions_id =
FINANCIALS.kf_submissions_id) INNER JOIN [Financial Totals] ON
FINANCIALS.kp_financials_id = [Financial Totals].kp_financials_id
WHERE (
((FINANCIALS.[kf_programs_id]=[Forms]![Reports Launcher]![f_program_filter])
OR ([Forms]![Reports Launcher]![f_program_filter]="ALL"))
AND
((FINANCIALS.[fiscal_year]=[Forms]![Reports Launcher]![f_fiscal_year_filter])
OR ([Forms]![Reports Launcher]![f_fiscal_year_filter]="ALL"))
AND
((FINANCIALS.[time_scale]=[Forms]![Reports Launcher]![f_time_scale_filter])
OR ([Forms]![Reports Launcher]![f_time_scale_filter]="ALL")));
It seems fairly straight forwards, I'm selecting records from 2 Tables and 1
other query, then filtering them based on a few combo boxes. I've used this
technique a few times before and it's always worked. Also, the error only
occurs when I add the WHERE statement, but I can't find any errors in it.
Any help?
qhat I'm doing wrong. My SQL is the following:
SELECT SUBMISSIONS.title, SUBMISSIONS.timing, SUBMISSIONS.activity,
SUBMISSIONS.vote_1, SUBMISSIONS.vote_2, FINANCIALS.*, [Financial
Totals].amount_approved
FROM (SUBMISSIONS INNER JOIN FINANCIALS ON SUBMISSIONS.kp_submissions_id =
FINANCIALS.kf_submissions_id) INNER JOIN [Financial Totals] ON
FINANCIALS.kp_financials_id = [Financial Totals].kp_financials_id
WHERE (
((FINANCIALS.[kf_programs_id]=[Forms]![Reports Launcher]![f_program_filter])
OR ([Forms]![Reports Launcher]![f_program_filter]="ALL"))
AND
((FINANCIALS.[fiscal_year]=[Forms]![Reports Launcher]![f_fiscal_year_filter])
OR ([Forms]![Reports Launcher]![f_fiscal_year_filter]="ALL"))
AND
((FINANCIALS.[time_scale]=[Forms]![Reports Launcher]![f_time_scale_filter])
OR ([Forms]![Reports Launcher]![f_time_scale_filter]="ALL")));
It seems fairly straight forwards, I'm selecting records from 2 Tables and 1
other query, then filtering them based on a few combo boxes. I've used this
technique a few times before and it's always worked. Also, the error only
occurs when I add the WHERE statement, but I can't find any errors in it.
Any help?