Displaying query parameters in report.

peters

Registered User.
Local time
Today, 02:14
Joined
Nov 9, 2000
Messages
24
First of all, I would like to thank everyone in all the groups for the great help they have been to me.

I have another problem I hope people can help me with. I have a report that is created using a query which has data parameters giving me data between a start date and an end date. The specific parameter is entered in the query this way:

>[start date (ex. July 1, 2000)] and < [end date (ex. December 31, 2000)]

What I would like to do is have the start date and end date appear in my report header so I know that this report is for data between x date and y date.

I tried to add an unboud cell and make it = the paramater or for example:

=[start date (ex. July 1, 2000)] however, the result is getting prompt again for the parameter.

Does anyone have other suggestions or solutions I could try.

In advance, thanks.
 
Hi there,

You could try this very simple solution. I dont know what sort of front-end you have set up, but why dont you try opening the report from an unbound form?

You will need 2 unbound text boxes on your form: [start date] and [end date].

Set your parameters in your query to target these fields.

Use a command button on your form to open your report with the link criteria as follows,

stLinkcriteria = "Start Date = Forms!<your form name![start date] And End Date = Forms!<your form name>![End Date]

Then the usual:

DoCmd.Open Report stDocname,,stLinkCriteria


You will now need two more unbound text boxes on your report: [start] And [End]. Make the control scources for these text boxes the two text boxes you have on your new form.

Now, insert your start date and end date on your form and click your button. The report should then filter between the criteria you have entered, and it should insert the values in your unbound text boxes!

I hope this is what you were after.

Barry.
 

Users who are viewing this thread

Back
Top Bottom