Linking data into a Report header

  • Thread starter Thread starter dab1477
  • Start date Start date
D

dab1477

Thanks in advance for the assist.

I have a report driven from a query where the query
contains the expression: "Between [Start] and [End}". The
report graphs the sum of 2 fields based upon a start and
end date. I place the data graphically into the detail
section of the report.

My Problem:

I want to show the range of the expression in the Report
Header. I've tried to bind a text box to the Date field
of the query. Because of the expression "Between[]and[]"
it will not read any date - the Start nor End.

What must I do to show a date in my report header based
upon a date entered into the query?

I am able to get the report to run and graphically display
in the report, but my audience will have no way of knowing
the date range of the data displayed in the report. I am
trying to avoid a manual entry into the report. Even
so...I am not adverse to a manual entry if it can be done
without the user accessing the design mode of the report.

Thanks again from a self taught (via this group)novice.
 
Add two text boxes to your Report header section.
Set the Control Source of the first to:
Start
and the second to:
End
Set the Format property to Short Date or Long Date or whatever you wish.
Use the labels of the text boxes to get the "Between" and "and" bits.

It's a really good idea to declare these parameters in your query.
Open the query in design view, and choose Parameters on the Query menu.
Enter:
Start Date
End Date
This helps to ensure Access understands the data types.
 
Add a text box to your header and paste the following in
properties "control source" > ="Between " & [Type a
beginning Admit Date] & " and " & [Type an ending Admit
Date]< you will get prompts that allow you to type in the
appropriate box. I found this in the help screen of access.
 
I get a $Name error everytime. What am I doing wrong?
-----Original Message-----
Add two text boxes to your Report header section.
Set the Control Source of the first to:
Start
and the second to:
End
Set the Format property to Short Date or Long Date or whatever you wish.
Use the labels of the text boxes to get the "Between" and "and" bits.

It's a really good idea to declare these parameters in your query.
Open the query in design view, and choose Parameters on the Query menu.
Enter:
Start Date
End Date
This helps to ensure Access understands the data types.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Thanks in advance for the assist.

I have a report driven from a query where the query
contains the expression: "Between [Start] and [End}". The
report graphs the sum of 2 fields based upon a start and
end date. I place the data graphically into the detail
section of the report.

My Problem:

I want to show the range of the expression in the Report
Header. I've tried to bind a text box to the Date field
of the query. Because of the expression "Between[]and []"
it will not read any date - the Start nor End.

What must I do to show a date in my report header based
upon a date entered into the query?

I am able to get the report to run and graphically display
in the report, but my audience will have no way of knowing
the date range of the data displayed in the report. I am
trying to avoid a manual entry into the report. Even
so...I am not adverse to a manual entry if it can be done
without the user accessing the design mode of the report.

Thanks again from a self taught (via this group)novice.


.
 
Let's clarify: what are Start and End?

Are they parameters in your query? If so declare them.

Are they text boxes on a form? If so, try referring directly to them
instead, e.g.:
=Forms!MyForm!Start

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

dab1477 said:
I get a $Name error everytime. What am I doing wrong?
-----Original Message-----
Add two text boxes to your Report header section.
Set the Control Source of the first to:
Start
and the second to:
End
Set the Format property to Short Date or Long Date or whatever you wish.
Use the labels of the text boxes to get the "Between" and "and" bits.

It's a really good idea to declare these parameters in your query.
Open the query in design view, and choose Parameters on the Query menu.
Enter:
Start Date
End Date
This helps to ensure Access understands the data types.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Thanks in advance for the assist.

I have a report driven from a query where the query
contains the expression: "Between [Start] and [End}". The
report graphs the sum of 2 fields based upon a start and
end date. I place the data graphically into the detail
section of the report.

My Problem:

I want to show the range of the expression in the Report
Header. I've tried to bind a text box to the Date field
of the query. Because of the expression "Between[]and []"
it will not read any date - the Start nor End.

What must I do to show a date in my report header based
upon a date entered into the query?

I am able to get the report to run and graphically display
in the report, but my audience will have no way of knowing
the date range of the data displayed in the report. I am
trying to avoid a manual entry into the report. Even
so...I am not adverse to a manual entry if it can be done
without the user accessing the design mode of the report.

Thanks again from a self taught (via this group)novice.
 
Back
Top