Copying a split FrontEnd (1 Viewer)

tedsmobilephone

New member
Local time
Today, 08:13
Joined
Oct 17, 2024
Messages
2
I have a database with a split FrontEnd and BackEnd.
I have written a module in the FE to make a copy of the BE using the FileSystemObject.CopyFile. There is lots here on how to do this.

Next, from the same above FE module, I wanted to make a FE copy of itself, suitably datestamped in the filename and stored in a safe place.
I have found lots of information about creating a new database and copying all the objects (queries, forms, reports etc) into this new database.
However I have managed to make a copy of the FE from itself using the similar FileSystemObject.CopyFile coding as with the BE.

My question is, the FE this is very similar coding to the BE coding and it works so WHY does the copying of each individual object into an empty database seem to be the preferred method?

I am happy to post all my code if it helps. Many thanks folks.
 
Last edited:
Hi. Welcome to AWF!

I also use the CopyFile method to back up the FE. Do you have a link to reference the "preferred" method you mentioned? The only reason I could think of is it potentially eliminates any lingering corruptions.
 
Stack Overflow has a page titled "Can a MS Access datyabase create a backup of itself while it's open using VBA"

I cannot seem to enter the URL. Far too long-winded for me.
 
Stack Overflow has a page titled "Can a MS Access datyabase create a backup of itself while it's open using VBA"

I cannot seem to enter the URL. Far too long-winded for me.
Can you copy and paste the url and then remove some parts to "fool" the software, so it won't try to create a link? For example:

http www accessmvp com / thedbguy
 
I use FSO to copy the file

FSO.CopyFile SourceFile, DestinationFile, True

This code is inside a loop that adds a suffix to the file name to create the DestinationFile. The loop checks to see if a file exists with "_1" and if it does, it adds 1 and tries again with "_2". That lets you make multiple backups in the same day.

The thing about either method is that YOU need to be sure that there are no unsaved changes in any object before you do the copy.
 

Users who are viewing this thread

Back
Top Bottom