Filename

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Guys,

I'm creating reports but what I would like it to do it put the Filename on
the report too. The database I'm creating will be used to store data for W
month to X month. Then through copying the file and changing the name it will
then store Y to Z. But what I could really do with is the filename being
displayed on any report printed.

Any ideas?

Cheers.
 
Set the Control Source of the text box on the report to:
=CurrentProject.FullName

In older versions:
=CurrentDb.Name
 
Hi.
The only way I know of is to use:
CurrentDb.Name
This displays the entire path also, but you may be able to use Right()
function to strip the MDB name.
Hope this helps.
Fons
 
Guys,

That's great stuff.

But I'm a bit of a novice in Access and although that suggestions give the
filename it also gives the path. What would I have to do this:

Rather than - c:\my documents\my database.mdb
But display just the name itself, preferably without the .mdb on the end. So
just - my database

Any ideas?
Cheers,
Ash.
 
After looking at Allen's response I found you can use:
= =CurrentProject.Name
for just the file name, without the path.
Fons
 
Sorry skip the extra =

Fons Ponsioen said:
After looking at Allen's response I found you can use:
= =CurrentProject.Name
for just the file name, without the path.
Fons
 
I just started using Access 2003. The older version works in Access 2000 and
prior and the new version worked in Access 2003. Works great. Just wish
Access would have caught it, when I switched versions. Thanks. This was a
great help.
 
Back
Top