This expression | Prints |
=Page | A page number (for example, 1, 2, 3) in the page footer. |
="Page " & Page & " of " & Pages | "Page n of nn" (for example, Page 1 of 5, Page 2 of 5) in the page footer. |
=Pages | The total number pages in the form or report (for example, 5). |
Dim intTotalPages As Integer, strMsg As String
intTotalPages = Me.Pages
strMsg = "This report contains " & intTotalPages & " pages."
MsgBox strMsg