I have a totals report based on a query the qbf is for the date input field. I want to be able to run this report from two separate forms the first form is for users where they select the month and year from a combo box the criteria looks like below this is done to ensure users only run monthly or yearly reports to limit the chance of picking the wrong dates
Like [Forms]![Switchboard_Form]![Month] & "*" & [Forms]![Switchboard_Form]![Year]
I have another form that is sort of the Management Form in which the qbf Totals report can be run more in depth such as a certain range maybe for a certain week by using start date and end date the criteria looks like below
>=Nz([Forms]![Managment_Form]![From],#01/01/100#) And <=Nz([Forms]![Managment_Form]![To],#12/31/9999#)
This lets totals be pulled using both, none, or one or the other of the start date and end date
Is there a way I can set up the query to tell which form is open and to use the correct criteria for that particular form. I tried using "or" however the query still prompts for the other set of values no matter which form u use but works fine when you remove the not needed criteria. I can provide a better example if needed let me know if this is unclear.
Thanks