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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter Query for report problem. 2

Status
Not open for further replies.

cashe

Technical User
May 4, 2002
60
GB
Hi all,

I have one query which a management report is based on. The management report has 5 sub reports which are based on the same query. The query has date parameters for mobilised date and demobilised date. When you run the query the parameter boxes for the date input keep appearing about 8 times before going away. How can I make the query accept the parameter once?

All help apreciated


Cashe ;-)
 
Hi, you might look and see if you have a parameter dates in your subreports as well. If there are, I'd remove them.

Another thing you might try is use a couple text boxes on a form for start and end dates and use those as your query parameter criteria..

Hope that helps.
 
Thanks for the reply pdldavis,

I do not have any parameter dates in the subreports. The parameter is only specified in the query sql. All the sub reports use the same query which I think is my problem.

I'm not to sure what you mean about the text boxes on a form. I would be greatful if you could explain this a bit more.

Thanks

Cashe
 
Sure,

A popular thing to do is put two text boxes on a form - txtStartDate & txtEndDate. Your date parameters would
be placed in these text boxes.

The your report's query criteria for your date field would look something like:

Between [Forms]![YourForm]![txtStartDate] And [Forms]![YourForm]![txtEndDate]

You can also put a couple text boxes in your report header
that reference the form text boxes with a control sources

like: = forms!YourFrom!txtStartDate
= forms!YourFrom!txtEndDate

- which prints out the report start and end dates so you know between what dates the report was run.

Hope that helps.


 
Hi pdldavis,

Thanks again. It works great...phew :)

Cashe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top