Backup data

G

Guest

Good Morning!

User wants to backup the data each time they open the application and keep 3
lastest data. I'm naming the file, plus the timestamp (date, hour, minutes,
seconds). The syntax is below but Timestamp (hour,minutes,seconds) displays
all zero. Since file name is not unique it overwrites into old file. Any
suggestions will be appreciated.

File name created "FileName070313000000.mdb"

strBkp = strDir & "FileName" & Format(Date, "yymmddHhNnSs") & ".mdb"
 
M

Marshall Barton

skk said:
Good Morning!

User wants to backup the data each time they open the application and keep 3
lastest data. I'm naming the file, plus the timestamp (date, hour, minutes,
seconds). The syntax is below but Timestamp (hour,minutes,seconds) displays
all zero. Since file name is not unique it overwrites into old file. Any
suggestions will be appreciated.

File name created "FileName070313000000.mdb"

strBkp = strDir & "FileName" & Format(Date, "yymmddHhNnSs") & ".mdb"


Use Now instead of Date
. . . Format(Now, "yymmddHhNnSs") . . .
 
G

Guest

Thanks Marshall. I've try the "Now" too but without the Format(Now,
"yymmddHhNnSs"). Works Great! Thanks again.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top