F
FUBARinSFO
Hi:
Desigining a footer in Access 2003 report, I've worked out with VBA to
put fully-qualified path and file name in the footer, along with the
name of the data table it is referencing (code below).
This does not use the '=CurrentDb.Name' suggested by a number of
postings in this group. When I place '=CurrentDb.Name' in a text box
(which changes to '[currentdb].[Name]' and run the report, I get a
text input box "Enter Parameter Value" for 'currentdb'.
Clearly it does not recognize the built-in variable 'CurrentDb' Why
is that?
Thank you in advance for your help.
-- Roy Zider
This is VBA code:
-------------------------------------------
Option Compare Database
Function MyPath() As String
' 7/22/2010 lsz
' this gives full dpfname
MyPath = CurrentProject.FullName
End Function
-------------------------------------------
This is in text box on page footer:
-----------------------------------------------
=MyPath() & " [" & [Name] & "]"
-----------------------------------------------
System information on Microsoft Access 2003
-------------------------------------------------------------------
Application name Microsoft Access
Version 11.0
Build 8166
Product ID 73931-640-4055412-57901
Application path C:\Program Files\Microsoft Office\OFFICE11\
Language English (United States)
ADO version 2.8
VBA version 6.05
References VBA, Access, stdole, DAO, ADODB
Database name dbVO23.mdb
Database path D:\D\DandS\BitBucket\MyDox\_OWL\Accounting 2\Dox\2.
Verified Objections
Database size 1268.0 KB
Database create date 7/19/2010 20:15:58
Current user Admin
Jet version 4.0
Desigining a footer in Access 2003 report, I've worked out with VBA to
put fully-qualified path and file name in the footer, along with the
name of the data table it is referencing (code below).
This does not use the '=CurrentDb.Name' suggested by a number of
postings in this group. When I place '=CurrentDb.Name' in a text box
(which changes to '[currentdb].[Name]' and run the report, I get a
text input box "Enter Parameter Value" for 'currentdb'.
Clearly it does not recognize the built-in variable 'CurrentDb' Why
is that?
Thank you in advance for your help.
-- Roy Zider
This is VBA code:
-------------------------------------------
Option Compare Database
Function MyPath() As String
' 7/22/2010 lsz
' this gives full dpfname
MyPath = CurrentProject.FullName
End Function
-------------------------------------------
This is in text box on page footer:
-----------------------------------------------
=MyPath() & " [" & [Name] & "]"
-----------------------------------------------
System information on Microsoft Access 2003
-------------------------------------------------------------------
Application name Microsoft Access
Version 11.0
Build 8166
Product ID 73931-640-4055412-57901
Application path C:\Program Files\Microsoft Office\OFFICE11\
Language English (United States)
ADO version 2.8
VBA version 6.05
References VBA, Access, stdole, DAO, ADODB
Database name dbVO23.mdb
Database path D:\D\DandS\BitBucket\MyDox\_OWL\Accounting 2\Dox\2.
Verified Objections
Database size 1268.0 KB
Database create date 7/19/2010 20:15:58
Current user Admin
Jet version 4.0