Delores_C
asked on
Adding filename and path on a report in Access 2007
I have used the code below to insert the database table name in a report, but it is not working in Access 2007. Can someone please tell me the new code to use.
=[CurrentDb].[Name]
=[CurrentDb].[Name]
=currentproject.FullName
Where are you putting this value?
Have you tried: =Currentproject.fullname
Have you tried: =Currentproject.fullname
ASKER
text box, source code
ASKER
I tried putting your code in the text, report footer. It did not work
strange, works for me.
Try this. Replace the textbox with a label (lbl_database).
Then in the report footers Format event, try this:
Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
Me.lbl_Database.Caption = CurrentProject.FullName
End Sub
Try this. Replace the textbox with a label (lbl_database).
Then in the report footers Format event, try this:
Private Sub ReportFooter_Format(Cancel
Me.lbl_Database.Caption = CurrentProject.FullName
End Sub
Are you displaying your report in Preview or Report or Layout view?
ASKER
Preview
Still getting an error. See exactly what I have entered and the message received
Private Sub ReportFooter_Format(Cancel As Integer, FormatCount As Integer)
Me.lbl.Database.Caption = CurrentProject.FullName
End Sub
Error Message received “ A custom macro in this report has failed to run, and is preventing the report from rendering.”
Still getting an error. See exactly what I have entered and the message received
Private Sub ReportFooter_Format(Cancel
Me.lbl.Database.Caption = CurrentProject.FullName
End Sub
Error Message received “ A custom macro in this report has failed to run, and is preventing the report from rendering.”
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, it worked