Report accesses query multiple times

thatlemhome

Registered User.
Local time
Today, 13:19
Joined
Mar 31, 2009
Messages
26
I have a query with a "Between" statement to filter the data by a specific date range. This runs fine.

I then built a report and pull data into the report from the query. When I run the report I get the date range between statement to answer as I expect. So far, so good.

However, when I add a chart to the report, suddenly I am getting multiple requests for the date range in order to build the report. The chart for each grouped set of data is accessing the query, so I get multiple requests for the range. Without answering, I get a blank chart.

I have verified my parameter settings for the report and chart against an application that works fine, and everything checks out.

Does anyone know of a setting or similar that will force the charts to continue to go back to the query and run the between statement again. Acts almost like it's not holding the data and needs to request for each build.

Haven't run into this before. :confused:
Thanks.
 
i have noticed that behind the scenes, access DOES check the same query multiple times in some cases.

the way round this is not to have the parameters IN the query.

enter the date range or whatever in a form, and get the query to read the values form the form

between forms!myform!startdate and forms!myform!enddate
 
ok, I'm not 100% following, as I have not approached it from that direction before, but here goes....

In my reports page (frm_Reports) I added two unbound text boxes (StartingDate and EndingDate), and specified short date type.

I then removed the parameter in the query running the report and replaced with the following:

Between [forms]![frm_Reports]![StartDate] And [forms]![frm_Reports]![EndDate]

However when I enter a date range and then try to run the report, it ignores the entered dates and instead requests parameters of StartDate and EndDate.

Did I understand you correctly? I must have something wrong here. I like the setup.
 
ok, I see an immediate error... StartDate vs StartingDate and EndDate vs EndingDate.

I fixed that, but still the same issue remains
 
Ok, I got it....

The syntax needed to be.....
Between [forms]![frm_Reports].[StartDate] And [forms]![frm_Reports].[EndDate]

. not ! before the field

Thanks for the assist. I like this much better and should solve my issue. (I hope)
 

Users who are viewing this thread

Back
Top Bottom