Add report name in Access report footer

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Trilby

Thread Starter
Joined
Jul 1, 2002
Messages
11
I am using Access 2003 and want to put the file (database) name and the report name in the footer of my report. I'm using =CurrentProject.Name as the control source in a text box of the footer to get the file name. Is there a command I can use to add the report name?
 
Joined
Jun 11, 2003
Messages
152
Hi Trilby

You could try this:

In the VBA code module (Class Module) for your report write a simple function (I've called it Get_Report_Name in my example):

Private Function Get_Report_Name() As String

Get_Report_Name = Me.NAME

End Function

In your report footer: add a text box at the position where you want to display the report name. In the Control Source property for the new text box enter: =Get_Report_Name()

This should display the report name when the report is run.

Deej
 
Joined
Mar 16, 2001
Messages
76
Put this into a module

Code:
Function GetReportName() As String

GetReportName = Reports(0).Name

End Function


Put a text box into you report and enter =GetReportName()


This is mean you do not have to put the private function into each report.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Top