Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Header Line Control

Status
Not open for further replies.

jtk7622

Technical User
Mar 29, 2004
6
US
I have an access form that gives a user the opportunity to search a database by specific values of different fields to pull up all records that match the search criteria. When the submit button is pressed, it brings up all the records with that criteria. If the user wants to print this report, another button is pressed and the report is printed. My question is how to get the value(s) of the user's search criteria , by using a text box?, into the header of the report page so that when the sheet is printed it is easy to tell what the report was based on. Would I use an expression or some other format??
 
Add a text control to your form and concatenate all the selection choices into it:

txtDisplay = Selection1 & ", " & Selection2 etc

Where Selection1/2, etc are the controls that contain the filter criteria.

I would probably put this in the Click event for the button that produces the report.

Place another text control on your report and set it's control source to:

Forms!frmSourceForm.txtDisplay

Where frmSourceForm is the name of the form used to generate the report.

Hope that helps. Larry De Laruelle
ldelaruelle@familychildrenscenter.org

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top