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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Backing up linked database

Status
Not open for further replies.

Islwyn

Programmer
Nov 8, 2003
26
GB
This may seem like a silly question to some of you but can anyone tell me how to go about creating a button on a form in an Access database that will copy a linked database (ideally compressed) to a floppy disk.

Cheers

Islwyn
 
I presume you know of the location of the linked database?

If so, then the following is an example taken from the help file should help. Put it into the code behind the on CLICK of the button you want:
Code:
FileCopy Statement Example
This example uses the FileCopy statement to copy one file to another. For purposes of this example, assume that SRCFILE is a file containing some data.

Dim SourceFile, DestinationFile
SourceFile = "SRCFILE"    ' Define source file name.
DestinationFile = "DESTFILE"    ' Define target file name.
FileCopy SourceFile, DestinationFile    ' Copy source to target.

I don't see why you can't call the source file "c:\my Dir\my file.mdb" and the destfile "a:\my file.mdb"

Hope this helps :)

Aubs
 
Many thanks Aubs, that works fine.

Islwyn
 
No probs Islwyn.

Glad I can be of help (sometimes)!!



Aubs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top