I have a report that displays the records for a certain date range entered by the user.
At the bottom of the report I want to display the Averages for certain fields in the records. I can't do this in the same query that's being used in the report because there is only one average for all records. My first query asks the user to enter the date range. My second query references the first query, which actually seems like it's not going to work because I'm not sure if the dates are going to be correctly referenced.
I learned that I need to use DLookup for this, but it's not working right so far. Perhaps I need to add criteria, which I know is optional, but to get the averages for the dates that are entered by the user, how would I do this without prompting the user a second time? If I don't use any criteria and simply use DLookup to reference the field, then it asks me for the value of "DLookup("AveragePercentage", "Query2")
At the bottom of the report I want to display the Averages for certain fields in the records. I can't do this in the same query that's being used in the report because there is only one average for all records. My first query asks the user to enter the date range. My second query references the first query, which actually seems like it's not going to work because I'm not sure if the dates are going to be correctly referenced.
I learned that I need to use DLookup for this, but it's not working right so far. Perhaps I need to add criteria, which I know is optional, but to get the averages for the dates that are entered by the user, how would I do this without prompting the user a second time? If I don't use any criteria and simply use DLookup to reference the field, then it asks me for the value of "DLookup("AveragePercentage", "Query2")