I have a pop up form (fp_training_rpt_select) where the users have options to input data they want to print a report based upon (unbound, form selection fields are: employee, year_start, year_end, title).
Ultimately, If the user selects nothing, then I want all records to show on the report (r_training) when they click the print button (cmdPrint). If the user selects something that I want the report to filter based on what has been selected when they hit the print button.
I have tried writing IIf statements on the corresonding fields in the query (q_training_rpt) to print all if none but cannot seem to make this work.
FYI...
-unbound control employee should drive filter on field employee_number in query
-unbound controls year_start and year_end should have a Between criteria on the Year field in the query
-unbound control title should drive filter on field title in query
Is there a better way to handle this? Any suggestions on where and how to write the code for this?
Thanks!
Ultimately, If the user selects nothing, then I want all records to show on the report (r_training) when they click the print button (cmdPrint). If the user selects something that I want the report to filter based on what has been selected when they hit the print button.
I have tried writing IIf statements on the corresonding fields in the query (q_training_rpt) to print all if none but cannot seem to make this work.
FYI...
-unbound control employee should drive filter on field employee_number in query
-unbound controls year_start and year_end should have a Between criteria on the Year field in the query
-unbound control title should drive filter on field title in query
Is there a better way to handle this? Any suggestions on where and how to write the code for this?
Thanks!