Export???

geregs

I@mac
Local time
Today, 15:18
Joined
Feb 27, 2008
Messages
20
Hi All!
Is there a solution for the next problem:
I would like to create a button in access XP that will create a new blank database and after creating it to export all of my tables that are stored in my database that I am working in. I need it to make some kind of security button (archive) if my database dies suddenly, my data will be secured. But I would like to give to the new archive file a new name every time I use that button. So far I manage to create that button but I have to specify the name and the path of that file in advance in the code and that is what I would like to change.
Thanks in advance!:confused:
 
How about incorporating the date and/or time into the backup filename?
Going down to seconds would (probably) guarantee a unique name...
 
Simple Software Solutions

I imagine you will have predetermined where the destination will be? Next base you naming conventions on dates, whereby when you click the button it creates a psuedo file name like 20080521BK.MDB. Where BK is short for BackUp. You could extend this to include the Time, thus: 20080521_12:00:30BK.mdb. So if you back up more than once a day you will be able to keep all versions and also be able to sort them by date created.

In summary you will add the name of the new file to the destination folder and copy.

Code:
FileSystemObject.CopyFile("C:\LiveData\Database.MDB", "D:\Backups\20080521_12:00:30BK.mdb")

CodeMaster::cool:
 
It should be like the save as function so I can chose the path and the file name every time.:(
 
Simple Software Solutions

You can still use that approach using the common dialog activeX control. Within that you can speficy the default path and a default filename and let the user change it if they wish. The naming conventions was for automated process. You are still doing it manually:confused:



But I would like to give to the new archive file a new name every time I use that button.

So far I manage to create that button but I have to specify the name and the path of that file in advance in the code and that is what I would like to change.

It should be like the save as function so I can chose the path and the file name every time

First you ask for a way to give the new archive file a new name every time

Secondly you say you need it to generate a path and file name for you.

Finally you are stating that you want to chose the path and file name every time.:confused:

I am confused as to what you really want:confused::confused:
 
Yes, I understand. My English is not so sophisticated so sometimes I confuse people. I want to make a button that will do next:
when I hit it I want to open a popup window (same as "save as" window) to chose the path and the file name for the blank database.
After I enter the name, and chose the path, some of the tables from my database should be exported to that new database. that is all.
Thanks people and I am sorry if I wasn`t clear enough.:(:(:(
 

Users who are viewing this thread

Back
Top Bottom