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

Is there away to acess files through Access2000???

Status
Not open for further replies.

Magnum45

Programmer
May 5, 2000
6
US
I want to implement a function to back-up the database on a Zip drive.  Anyone know how to access files in such a way.
 
I don't think I understand your question. Do you want to copy a file to a zip drive from within Access? The database itself that you are in or some other external files? You can manipulate external files from within Access by using the Microsoft Scripting Runtime Library. Set a reference to it.<br><br>Sample<br><br>Sub DeleteIt(filetodelete As String)<br><br>&nbsp;&nbsp;&nbsp;&nbsp;' use this to delete files on the system<br>&nbsp;&nbsp;&nbsp;&nbsp;Dim fs As FileSystemObject<br>&nbsp;&nbsp;&nbsp;&nbsp;Set fs = CreateObject(&quot;Scripting.FileSystemObject&quot;)<br>&nbsp;&nbsp;&nbsp;&nbsp;fs.DeleteFile filetodelete<br>&nbsp;&nbsp;&nbsp;&nbsp;<br>End Sub<br><br>This will delete any file you pass to the procedure. You can also do copies, moves, etc.
 
Can you tell me the last command inorder to copy the database file into a specific driver.&nbsp;&nbsp;I'm going to use this to enable a user to make a backup copy of the db by just pressing a button within Access.
 
Why not just use the command line switch to compact the database to another drive?<br><br>/compact <br><br>target database or target Access project Compacts and repairs the Access database, or compacts the Access project that was specified before the /compact option, and then closes Microsoft Access. If you omit a target file name following the /compact option, the file is compacted to the original name and folder. To compact to a different name, specify a target file. If you don't include a path in target database or target Access project, the target file is created in your My Documents folder by default.&nbsp;&nbsp;<br><br>(From Help)
 
Do You have any suggestions as to how to do this through a function call within Access??
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top