Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using subqueries with dates 1

Status
Not open for further replies.

Stuartp

Technical User
Feb 22, 2001
178
GB
I have created a query using fields [start date] and [end date] so that when the query is run, it will pop up a box asking what these values are, and the user can type in the dates between which the query must return information.

I also wish to chart this information, so I created a chart report based on the above query. I made a report based on the main query, and then entered the chart report as a subreport in this one.

However when I run the main report, it asks me for the start and end dates several times, which obviously is a pain for the user.

So I was wondering if anyone can show me a better (and hopefully not too complicated!!) way to do this, where the user only has to enter the dates once.

Thanks.

Stuart
 
You could always show the user a form (eg form1) with 2 text boxes (start and end date). Then instead of [Start Date] as a criteriam you would have:

forms!form1![txtStartDate]

and instead of [end date]:

forms!form1![txtEndDate]

assuming the text boxes were names txtStartDate and txtEndDate. Then when you run the report, make this form invisible.

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top