Sometimes you may want to print a report that has information such as the name of the Report, or the name of the Database, in the Report's footer, to identify the print out. To do this, you need to add a Textbox to the relevant location on the Report, and then set the ControlSource to:
=[Name]
For the name of the Database, you would instead set the ControlSource to:
=Dir([CurrentDb].[Name],16)
Note that we cannot use the VBA constant vbDirectory, and so must instead use the numeric value, which is 16.
No comments:
Post a Comment