How do I reference a parameter in a report?

K

KimstrB

I have a date parameter in a query that I am using for a report. When I
tried to refernce the parameter in the report header, it asks the parameter
twice. It does show up correctly on the report, but I don't want to have to
input the parameter info twice.
 
G

Golfinray

Are you sure it is giving it to you twice. Or is it giving you the label and
the control? It should not be asking you for something in a report. In
general all those things are set in the query. Try looking at the field list
and see if it is there. If not, you may have to modify your query.
 
F

fredg

This is a "between" but in the date field in a query I have
Between [forms]![Print2]![TodayDate] And [forms]![Print2]![SecondDate]

I select/enter the dates on a form [Print2] and then the
query reads that form when I click the report print button

I then have the report use that same data from the form
Dates [forms]![Print2]![TodayDate] - [forms]![Print2]![SecondDate]

Are you sure it is giving it to you twice. Or is it giving you the label and
the control? It should not be asking you for something in a report. In
general all those things are set in the query. Try looking at the field list
and see if it is there. If not, you may have to modify your query.


Dates 1/1/2008 - 7/1/2008
Is that what you wish to display on the report?

Using an unbound control on the report header:

="Dates " & forms!Print2!TodayDate & " - " & forms!Print2!SecondDate

1) The expression must start with an = sign.

2) Note the removal of the brackets.
When using the forms!FormName!ControlName syntax they are not
necessary here.

3) Make sure the form and control names are spelled identically in the
query and on the report.

4) You must concatenate the additional text into the expression.

5) The form MUST remain open when the report is run.

6) Close the form in the Report's Close event (or later).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top