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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report textbox refer to current report name? 2

Status
Not open for further replies.

jjlogan

Programmer
Jan 11, 2002
178
US
I have an Access 2000 database with many reports. The report names get changed sometimes. I like to put a textbox in the report footer than shows the current report name. I prefer not to hard code the name like this: = "name of report" because the names get changed and I don't want to worry about changing the textbox. So, I tried this: = Reports(0).Name and it worked very well as long as the current report is the only report open (i.e. index 0).
Question: Can anyone suggest a way to get the current report's name in this textbox regardless of how many reports are currently open?
Thanks for any input.
JeffL
 
Remou is correct and a good reason why never to use the word "name" as a table field name as all kinds of weird things can happen especially if you use VBA...

 
Much thanks to both Remou and Knicks for sharing your experience and insight! Simply specifying = [name] did the trick. I had spent much time researching this in Access Help file, on-line, and in Tek-Tips and it was hard to get a search to match my question. So, thanks to live folks like you.!
Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top