Report title based on TempVars

chellebell1689

Registered User.
Local time
Today, 08:38
Joined
Mar 23, 2015
Messages
267
Hello,
I have a report that I will print and use as a Sunday School attendance sheet. Currently the roster is generated and filtered based on a tempvars. I was wondering if it's possible (and how) to set the title based on the same tempvars.

Ex: TempVars = 1 Title = Steve's Adult One Class.

Thank you in advance for the help.
 
If the value for title is included in the filtered recordsource of the report, you should be able to put that in a text box on your report header. Another option is to use dlookup.

=dlookup("[fieldnametodisplay]","[table or query holding the data]","[criteria]")

=dlookup("Title","tblRoster","Title_Code='" & TempVars & "'")
 
I don't know VB that much (currently taking a class for it now), and most of my stuff is in macro. I was thinking about just adding a field in the Class table (the table that shows the class key number, teacher, class name, & class abbreviation) called "title" and then just use a combo box type set up to display the title. Do you see any problems with that? I don't see any, but I'm not an expert and can't really see possible errors down the road.
 
Sorry, forgot to close this. I created a field in the table w/ the class title and then set it up that way. Thanks for the help!
 

Users who are viewing this thread

Back
Top Bottom