Dynamically Building the Title of a Report

D

DaveF

I have a report that is generated from a form. The user picks a country
from a drop down list and then hits a command button to preview the report
of all records related to that country.

The drop down selection acts as a filter on the query that generates the
recordset for the report. For example, if the user selects "Germany" from
the drop down list, only records with "Germany" as the country appear in the
report.

This is fine but I want to dynamically build my report title so that it
specifies which country was selected. For example, the title would say
"Products from Germany" if Germany were selected and "Products from France"
if France were selected.

How can I pass and read the country selection in my report?

The query itself contains a country ID rather than the actual name. I could
modify the query to include the country name but I do not know how to
retrieve this value to populate the title of my report.

Thanks for any ideas.
Dave
 
E

ET Sherman

Dave,

1. Put the CountryName field in the query for the report.
2. Put a textbox control on the report in the heading.
3. Set the control source for this textbox control to:

="Products From " & [YourCountryNameField]

Regards,

ET Sherman
 

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