Change report title based on Form data

T

tim

Hello all,

My project is almost complete, thanks to the help I have gotten on this
board. I have one last question.

The reports that I made all have a few graphs and a title. The title
contains the month. Also, the title on the report is contained in a
LABEL.

Currently, the month is hard coded. So, if I want to run the report
for a past month, I have to manually edit the label and change the
month to match.

The report data is coming from a form with a calendar control on it so
that the user can just pick the date and run the report. How can I
pass the month from the calendar control into the report title, so that
it updates itself automatically?

Thanks!
Tim
 
W

Wayne Morgan

In the Open event of the report or the Format event of the section with the
label, set the Caption value of the label. You could also change the label
to a calculated textbox and have it refer directly to the form for the month
value. This is probably the better option.

Example control source for textbox:
=Format(Forms!MyForm!CalendarControl, "mmmm") & " the rest of what the label
currently says could go here"
 

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