Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

renaming destination database 1

Status
Not open for further replies.

samotek

Technical User
May 9, 2005
197
BG


can i rename a database with a code taking the next number available?
I am copying a database with the help of the following function :

Public Function copydb()
Dim strSource As String
Dim strDest As String
strSource = "C:\BE\db1.mdb"
strDest = "C:\BE\Archive.mdb"
FileCopy strSource, strDest
End Function

My question is, is it possible the string source for the next
copy to be db2, db3, etc?
If it is not possible is it possible with the current date ?
 
strDest = "C:\BE\db" & format(Date(),"yyyymmdd") & ".mdb"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top