Report Header Text From Query

G

Guest

I have a report that is populated from a query, I use a form to query for the
start date and end date.
(Between [Forms]![frmViewRpt]![StartDate] And [Forms]![frmViewRpt]![EndDate]
I like to add to the report header the start date and end date.
(7/16/2007 to 7/31/07)
I cannot get any thing I have tried to work for me. Does anyone have a
suggestion?
 
F

fredg

I have a report that is populated from a query, I use a form to query for the
start date and end date.
(Between [Forms]![frmViewRpt]![StartDate] And [Forms]![frmViewRpt]![EndDate]
I like to add to the report header the start date and end date.
(7/16/2007 to 7/31/07)
I cannot get any thing I have tried to work for me. Does anyone have a
suggestion?

In an unbound control in the report header:
="For sales between " & Forms!frmViewRpt!StartDate & " And " &
Forms!frmViewRpt!EndDate

If you wish the date formatted in a certain way, i.e. "March 1, 2006"
then use:
& Format(forms!frmViewReport!StartDate,"mmmm d, yyyy")
etc...

Note: the form must still be open when the report is run.
 
G

Guest

Thanks Fred that is what I was looking for.

fredg said:
I have a report that is populated from a query, I use a form to query for the
start date and end date.
(Between [Forms]![frmViewRpt]![StartDate] And [Forms]![frmViewRpt]![EndDate]
I like to add to the report header the start date and end date.
(7/16/2007 to 7/31/07)
I cannot get any thing I have tried to work for me. Does anyone have a
suggestion?

In an unbound control in the report header:
="For sales between " & Forms!frmViewRpt!StartDate & " And " &
Forms!frmViewRpt!EndDate

If you wish the date formatted in a certain way, i.e. "March 1, 2006"
then use:
& Format(forms!frmViewReport!StartDate,"mmmm d, yyyy")
etc...

Note: the form must still be 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