Report problem

  • Thread starter Thread starter trainsteve
  • Start date Start date
T

trainsteve

Hi, I need a little help.

I created a form so that the user could pick out a date range to search the
data with and then view a report that would include the date range. The
problem is that after they click to view the report, and the query runs and
doesn't find something that matches the criteria, it won't show the date
range in the report. Here is the control source that I have on the field in
the report

="Consideration Period: " & Format([Forms]![Form1]![Begin Date],"mmmm d"",
""yyyy") & " Through " & Format([Forms]![Form1]![End Date],"mmmm d"", ""yyyy")

What can I do to make it so that the date range entered into the form will
show up on the report no matter what the query results are.

Thanks,
 
Thanks, Duane

I was able to get it to work, now the problem is that when I export it to
Microsoft Word it doesn't get exported.

Any ideas on how to fix this?

Thanks

Duane Hookom said:
You might try moving the text box to either the Report Header or Page Header.
--
Duane Hookom
Microsoft Access MVP


trainsteve said:
Hi, I need a little help.

I created a form so that the user could pick out a date range to search the
data with and then view a report that would include the date range. The
problem is that after they click to view the report, and the query runs and
doesn't find something that matches the criteria, it won't show the date
range in the report. Here is the control source that I have on the field in
the report

="Consideration Period: " & Format([Forms]![Form1]![Begin Date],"mmmm d"",
""yyyy") & " Through " & Format([Forms]![Form1]![End Date],"mmmm d"", ""yyyy")

What can I do to make it so that the date range entered into the form will
show up on the report no matter what the query results are.

Thanks,
 
You might try an unbound text box (txtDateRange) and use code in the On
Format event of the report section like:

Me.txtDateRange = "Consideration Period: " & _
Format([Forms]![Form1]![Begin Date],"mmmm d"", ""yyyy") & _
" Through " & _
Format([Forms]![Form1]![End Date],"mmmm d"", ""yyyy")

--
Duane Hookom
Microsoft Access MVP


trainsteve said:
Thanks, Duane

I was able to get it to work, now the problem is that when I export it to
Microsoft Word it doesn't get exported.

Any ideas on how to fix this?

Thanks

Duane Hookom said:
You might try moving the text box to either the Report Header or Page Header.
--
Duane Hookom
Microsoft Access MVP


trainsteve said:
Hi, I need a little help.

I created a form so that the user could pick out a date range to search the
data with and then view a report that would include the date range. The
problem is that after they click to view the report, and the query runs and
doesn't find something that matches the criteria, it won't show the date
range in the report. Here is the control source that I have on the field in
the report

="Consideration Period: " & Format([Forms]![Form1]![Begin Date],"mmmm d"",
""yyyy") & " Through " & Format([Forms]![Form1]![End Date],"mmmm d"", ""yyyy")

What can I do to make it so that the date range entered into the form will
show up on the report no matter what the query results are.

Thanks,
 
Back
Top