Help with report's parameters in form

G

Guest

I have a report, "rptShipment", in which the Record Source is a query called
"qryShipments". The parameters for the field "DeliveryDate" worked as
desired with that fields criteria set at: Between [StartDate] And [EndDate]

It prompted for each criteria just as Access is expected to. To make it
easier for users, I created a form called "frmShipmentReport" with 2 unbound
text boxes. One named "StartDate", and the other named "EndDate". I changed
the criteria in qryShipments to: Between
[Forms]![frmShipmentReport]![StartDate] And
[Forms]![frmShipmentReport]![EndDate]

With the form opened and criteria entered, when I open the report it still
prompts me for StartDate and EndDate. No matter what dates I enter into
those prompts, it still correctly returns the report with the parameters
selected in frmShipmentReport.

What might be causing this to occur? Your help is greatly appreciated!
 
G

Guest

If the parameter indicate the full path
"[Forms]![frmShipmentReport]![StartDate]"
Three things to check
1. Form name is correct
2. The field name in the form is correct
3. Does the form still open when the report is loaded

If the parameter say "StartDate" just as it use to be, check
1. In the menu of the query select Query > Parameters.
Check if any parameter is declared there
2. Mybe one of the fields in the query called StartDate
3. Mybe one of the fields in the report is bounded to "StartDate", a field
that doesn't exist in the query.

To try it, open the form, insert date values, and run the query without the
report, that way you can know if the problem with the query or the report.
 
G

Guest

As it turns out, your very last thing to check (one of the fields in the
report...) was the one! I had the parameters selected displaying on the
report, but had the original [StartDate] & [EndDate] included in the
expression.

It all works great now! Thanks for the help! What a great forum!
Kevin

Ofer Cohen said:
If the parameter indicate the full path
"[Forms]![frmShipmentReport]![StartDate]"
Three things to check
1. Form name is correct
2. The field name in the form is correct
3. Does the form still open when the report is loaded

If the parameter say "StartDate" just as it use to be, check
1. In the menu of the query select Query > Parameters.
Check if any parameter is declared there
2. Mybe one of the fields in the query called StartDate
3. Mybe one of the fields in the report is bounded to "StartDate", a field
that doesn't exist in the query.

To try it, open the form, insert date values, and run the query without the
report, that way you can know if the problem with the query or the report.

--
Good Luck
BS"D


Kevin said:
I have a report, "rptShipment", in which the Record Source is a query called
"qryShipments". The parameters for the field "DeliveryDate" worked as
desired with that fields criteria set at: Between [StartDate] And [EndDate]

It prompted for each criteria just as Access is expected to. To make it
easier for users, I created a form called "frmShipmentReport" with 2 unbound
text boxes. One named "StartDate", and the other named "EndDate". I changed
the criteria in qryShipments to: Between
[Forms]![frmShipmentReport]![StartDate] And
[Forms]![frmShipmentReport]![EndDate]

With the form opened and criteria entered, when I open the report it still
prompts me for StartDate and EndDate. No matter what dates I enter into
those prompts, it still correctly returns the report with the parameters
selected in frmShipmentReport.

What might be causing this to occur? Your help is greatly appreciated!
 

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