How to Print the Report Name in the Report? (1 Viewer)

Gordon

Gordon
Local time
Today, 10:55
Joined
Nov 25, 1999
Messages
34
Hello,

I would like to create a text box which automatically prints the name of the report in the report. This is the report name as shown in Access, in the reports area (example rpt_monthly_sales).

I don't just want to type the name in, since I may change the report name at a later date, and also if I do this once then I can copy the text box for use in other reports and have it automatically be correct.

Any help would be most appreciated.

Gordon
 

RuralGuy

AWF VIP
Local time
Today, 04:55
Joined
Jul 2, 2005
Messages
13,826
I would think that Me.Name would give you that value.
 

Gordon

Gordon
Local time
Today, 10:55
Joined
Nov 25, 1999
Messages
34
I would think that Me.Name would give you that value.

Thanks for the suggestion. I put "=me.name" into a text box, which Access changed to "=[Me].[Name]"

When I ran the report it didn't work. Am I missing something?

Thanks for any help.....

Gordon
 

RuralGuy

AWF VIP
Local time
Today, 04:55
Joined
Jul 2, 2005
Messages
13,826
What version of Access? I just tried =Name in a textbox on a report and it worked in ac2k2.
 

boblarson

Smeghead
Local time
Today, 03:55
Joined
Jan 12, 2001
Messages
32,059
Thanks for the suggestion. I put "=me.name" into a text box, which Access changed to "=[Me].[Name]"

When I ran the report it didn't work. Am I missing something?

Thanks for any help.....

Gordon
Just an FYI for you - You can't use ME within controlsources. It is good only in VBA.

You can do as RG has mentioned = set the controlsource to

=[Name]

and that should do it for you (as long as you didn't make the mistake of naming one of your fields that reserved word).
 

Gordon

Gordon
Local time
Today, 10:55
Joined
Nov 25, 1999
Messages
34
Just an FYI for you - You can't use ME within controlsources. It is good only in VBA.

You can do as RG has mentioned = set the controlsource to

=[Name]

and that should do it for you (as long as you didn't make the mistake of naming one of your fields that reserved word).

Boblarson,

Thanks so much!! That worked fine.... exactly what I needed. :eek:


Gordon
 
Last edited:

Users who are viewing this thread

Top Bottom