Access MVP (2010-2015)


Add your Report Name to Page Footer…

Put the TEXT box on the Report and in the Control Source put…


OR to get the Report Name and the Date/Time

=[Name] & "  Printed on " & Now()

OR to get the Report Name and the Date

=[Name] & "  Printed on " & Date()

…now if you change the Name of the Report you don’t have to worry about updating a LABEL, it will do it for you.

Courtesy of Bob Larson, Access MVP (2008, 2009 & 2011)

In addition, you can also add the RecordSource of your Report…
(This only works if you use a Naming Convention!)

='(Based on ' & IIf(Left([RecordSource],3)="tbl","Table","Query") & ':  "' & [RecordSource] & '")'

And another way that takes more then just Tables and Queries into account…

Function ObjectType(Source As String) As String
'Courtesy of Hans V Access MVP  from
'Posted in Microsoft Answers on 8.9.2013
    Dim varType As Variant</strong>
    varType = DLookup("Type", "MSysObjects", "Name='" & Source & "'")
    If IsNull(varType) Then
        ObjectType = "Error!"
        Select Case varType
            Case 1, 4, 6
                ObjectType = "Table"
            Case 5
                ObjectType = "Query"
            Case Else
                ObjectType = "Other"
        End Select
    End If
End Function

 1,182 total views,  1 views today

Comments are closed.