I have a database that counts a number of events between a certain set of dates. The code looks something like..
SELECT Sum([ACO Report].[Board Fee $]) AS [Boarding Fee $]
FROM [ACO Report]
WHERE (([ACO Report].[Date of Pickup]) Between [First Date:] And [Second Date:]);
There are 20+ queries that search between First and Second date. For each report that these queries print to, you have to put in the same date.... 2x for each 20+ queries. What I would like to do is put in a function to input and save variables. For example, on my swithboard, have a "Insert Dates" function, where you can set the First and Second date. Then have all the queries refer to those saved variables instead of having to type it in each time. Is this possible? Thank you,
Bryan Elliott
Asst. IT Manager
SELECT Sum([ACO Report].[Board Fee $]) AS [Boarding Fee $]
FROM [ACO Report]
WHERE (([ACO Report].[Date of Pickup]) Between [First Date:] And [Second Date:]);
There are 20+ queries that search between First and Second date. For each report that these queries print to, you have to put in the same date.... 2x for each 20+ queries. What I would like to do is put in a function to input and save variables. For example, on my swithboard, have a "Insert Dates" function, where you can set the First and Second date. Then have all the queries refer to those saved variables instead of having to type it in each time. Is this possible? Thank you,
Bryan Elliott
Asst. IT Manager