How to insert input dates on a Report

H

Hannah

I have created a report that requires you to put in a date range (Between
[begin date] and [end date]). I would like to show this range on my report
and don't know how to format my report to show it.

Thanks
 
D

Damon Heron

If the dates are entered from a form which calls the report, in the header
of the report put a textbox with the control source equal to:

="For Transactions Between: " & Forms!frmReports![Begin Date] & " and " &
Forms!frmReports![End Date]

where "frmReports" is the name of the report with the date boxes on it.

Damon
 
H

Hannah

Hi Damon,
Thanks for the instruction but I could not get it to work for me. Here are
more detail that may give you more info:

The name of the field in my table called: Ref Date RCVD
My query (Facility Location Qry) for this field has a criteria of :

Between [Begin Date mm/dd/yy] And [End Date mm/dd/yy]

I created a form called (Ref Location Form) to capture this data and use the
same query for my report. The report name is: Location Detail Report.

I tried to use your suggestion and changed frmReports to the name of my
report, with a text field that I created under the Report Header:

="For Transactions Between: " & Forms!Location Detail Report![Begin Date
mm/dd/yy] & " and " & Forms!Location Detail Report![End Date mm/dd/yy]

Would you look at the statement above and let me know what I did wrong.

Thank you so much for your help.




--
Hannah


Damon Heron said:
If the dates are entered from a form which calls the report, in the header
of the report put a textbox with the control source equal to:

="For Transactions Between: " & Forms!frmReports![Begin Date] & " and " &
Forms!frmReports![End Date]

where "frmReports" is the name of the report with the date boxes on it.

Damon

Hannah said:
I have created a report that requires you to put in a date range (Between
[begin date] and [end date]). I would like to show this range on my
report
and don't know how to format my report to show it.

Thanks
 
D

Damon Heron

Ohh! my bad! I said "frmReports is the name of the report...." I meant it
should be the name of the form that has textboxes with the dates in them.

HTH
Damon

Hannah said:
Hi Damon,
Thanks for the instruction but I could not get it to work for me. Here
are
more detail that may give you more info:

The name of the field in my table called: Ref Date RCVD
My query (Facility Location Qry) for this field has a criteria of :

Between [Begin Date mm/dd/yy] And [End Date mm/dd/yy]

I created a form called (Ref Location Form) to capture this data and use
the
same query for my report. The report name is: Location Detail Report.

I tried to use your suggestion and changed frmReports to the name of my
report, with a text field that I created under the Report Header:

="For Transactions Between: " & Forms!Location Detail Report![Begin Date
mm/dd/yy] & " and " & Forms!Location Detail Report![End Date mm/dd/yy]

Would you look at the statement above and let me know what I did wrong.

Thank you so much for your help.




--
Hannah


Damon Heron said:
If the dates are entered from a form which calls the report, in the
header
of the report put a textbox with the control source equal to:

="For Transactions Between: " & Forms!frmReports![Begin Date] & " and " &
Forms!frmReports![End Date]

where "frmReports" is the name of the report with the date boxes on it.

Damon

Hannah said:
I have created a report that requires you to put in a date range
(Between
[begin date] and [end date]). I would like to show this range on my
report
and don't know how to format my report to show it.

Thanks
 
F

fredg

Hi Damon,
Thanks for the instruction but I could not get it to work for me. Here are
more detail that may give you more info:

The name of the field in my table called: Ref Date RCVD
My query (Facility Location Qry) for this field has a criteria of :

Between [Begin Date mm/dd/yy] And [End Date mm/dd/yy]

I created a form called (Ref Location Form) to capture this data and use the
same query for my report. The report name is: Location Detail Report.

I tried to use your suggestion and changed frmReports to the name of my
report, with a text field that I created under the Report Header:

="For Transactions Between: " & Forms!Location Detail Report![Begin Date
mm/dd/yy] & " and " & Forms!Location Detail Report![End Date mm/dd/yy]

Would you look at the statement above and let me know what I did wrong.

Thank you so much for your help.

Always include the relevant portion of any reply when responding. You
reply did not include Damon's response to your original post. It makes
it hard for anyone else to follow what is being said.

You don't need a form to 'capture' this parameter informatkion, though
you can use a form to 'enter' the parameters.

If Between [Begin Date mm/dd/yy] And [End Date mm/dd/yy]
is your query criteria, then, in the Report Header add an unbound text
control.
As it's control source write:
="For sales between " & [Begin Date mm/dd/yy] & " And " & [End Date
mm/dd/yy]

The text inside the brackets must be identical to the bracketed text
in the query.

Damon's reply would be correct if you were using a form to 'enter' the
parameters into, in which case the query criteria would be:

Between Forms!frmReports![Begin Date] and Forms!frmReports![End Date]

This form then must remain open when the report is run.
 
H

Hannah

I used the following statement in the unbound text box and it worked

="For Transaction between " & [Begin Date mm/dd/yy] & " And " & [End Date
mm/dd/yy]

Thank you so much. Fred and Damon


--
Hannah


fredg said:
Hi Damon,
Thanks for the instruction but I could not get it to work for me. Here are
more detail that may give you more info:

The name of the field in my table called: Ref Date RCVD
My query (Facility Location Qry) for this field has a criteria of :

Between [Begin Date mm/dd/yy] And [End Date mm/dd/yy]

I created a form called (Ref Location Form) to capture this data and use the
same query for my report. The report name is: Location Detail Report.

I tried to use your suggestion and changed frmReports to the name of my
report, with a text field that I created under the Report Header:

="For Transactions Between: " & Forms!Location Detail Report![Begin Date
mm/dd/yy] & " and " & Forms!Location Detail Report![End Date mm/dd/yy]

Would you look at the statement above and let me know what I did wrong.

Thank you so much for your help.

Always include the relevant portion of any reply when responding. You
reply did not include Damon's response to your original post. It makes
it hard for anyone else to follow what is being said.

You don't need a form to 'capture' this parameter informatkion, though
you can use a form to 'enter' the parameters.

If Between [Begin Date mm/dd/yy] And [End Date mm/dd/yy]
is your query criteria, then, in the Report Header add an unbound text
control.
As it's control source write:
="For sales between " & [Begin Date mm/dd/yy] & " And " & [End Date
mm/dd/yy]

The text inside the brackets must be identical to the bracketed text
in the query.

Damon's reply would be correct if you were using a form to 'enter' the
parameters into, in which case the query criteria would be:

Between Forms!frmReports![Begin Date] and Forms!frmReports![End Date]

This form then must remain open when the report is run.
 

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