Changing the Application Title with Code (Pt.2)

J

John Ortt

Hi Everyone.

Some time ago I asked how to change the application title of my database
using code.

Doug Steele was kind enough to reply with code which worked perfectly. I
was just wonderring if it was possible to do the same thing but with the
current database path after the date.E.G. "Backup 2005-02-08
P:\Archive\Archive.mdb"

Thanks in advance,

John.

Doug's example follows:
////////////////////////////////////

Function ArchiveDB()

Dim dbArchive As DAO.Database

If Dir("P:\Archive\Archive.mdb") <> "" Then Kill
"P:\Archive\Archive.mdb"
DBEngine.CompactDatabase "P:\MASTER\MasterDB.mdb",
"P:\Archive\Archive.mdb"

Set dbArchive = OpenDatabase("P:\Archive\Archive.mdb")
dbArchive.Properties("AppTitle") = "Backup " & Format(Date,
"yyyy-mm-dd")

End Function
 
Top