maestro83
04-13-2010, 04:11 PM
Hi,
I have a table that has an event field and several date/time fields eg:
Event-----Date1---------Date2---------Date3 etc
Expo------01/04/2010----24/03/2010----10/03/2010
Expo------01/03/2010----24/02/2010----10/02/2010
Expo------01/02/2010----24/01/2010----10/01/2010
Expo------01/01/2010----24/12/2009----10/12/2009
I followed these steps from another website:
Create a query to use as the RecordSource of your report.
In query design view, in the Criteria row under your date field, enter: >= [StartDate] < [EndDate] + 1
Choose Parameters from the Query menu, and declare two parameters of type Date/Time: StartDate Date/Time EndDate Date/Time
To display the limiting dates on the report, open your report in Design View, and add two text boxes to the Report Header section. Set their ControlSource property to =StartDate and =EndDate respectively.
I only put the criteria under the 1 field which I want the report based on. When I run the report it prompts me to enter the StartDate and EndDate correctly, but displays a full un-filtered report with dates outside of the range.
I noticed if I look at the query after running the report it adds another field to it and removes the criteria from the field I placed it in:
Field ([tbl_Events].[OpeningNight])>=[StartDate]
Table
Sort
Show
Criteria <[EndDate]+1
Any ideas how I can fix this would be greatly appreciated.
Thanks
Matt
I have a table that has an event field and several date/time fields eg:
Event-----Date1---------Date2---------Date3 etc
Expo------01/04/2010----24/03/2010----10/03/2010
Expo------01/03/2010----24/02/2010----10/02/2010
Expo------01/02/2010----24/01/2010----10/01/2010
Expo------01/01/2010----24/12/2009----10/12/2009
I followed these steps from another website:
Create a query to use as the RecordSource of your report.
In query design view, in the Criteria row under your date field, enter: >= [StartDate] < [EndDate] + 1
Choose Parameters from the Query menu, and declare two parameters of type Date/Time: StartDate Date/Time EndDate Date/Time
To display the limiting dates on the report, open your report in Design View, and add two text boxes to the Report Header section. Set their ControlSource property to =StartDate and =EndDate respectively.
I only put the criteria under the 1 field which I want the report based on. When I run the report it prompts me to enter the StartDate and EndDate correctly, but displays a full un-filtered report with dates outside of the range.
I noticed if I look at the query after running the report it adds another field to it and removes the criteria from the field I placed it in:
Field ([tbl_Events].[OpeningNight])>=[StartDate]
Table
Sort
Show
Criteria <[EndDate]+1
Any ideas how I can fix this would be greatly appreciated.
Thanks
Matt