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

Copy File

Status
Not open for further replies.

ryan1

Programmer
May 15, 2002
106
0
0
US
Help Needed! Here's what i'm trying to do. I want to run a procedure that will copy an access database from a location(some where on the network) to the users desktop.
 
If the users desktop computer is also on the network, you can simply use something like this:

Code:
dim fso as FileSystemObject

set fso = new FileSystemObject

fso.CopyFile source, dest

set fso = nothing

"Source" is (of course) your orignal database located somewhere on the network. "Dest" is the destination on the users desktop computer (e.g c:\windows\desktop or something). Be sure to set a reference to the Microsoft Scripting Runtime in order to use the FileSystemObject.

Bye,
Jeroen

A 3d level editor in Delphi
 
This will work with Access 2000?
 
Yes, i'm using this routine in an Access 2000 application myself. Just create a new public function (!) in VBA and call that function from a macro using Runcode (for example). The only problem you might have is not being able to access your users desktop computer from the network. But that's not Access specific.

Of course, this routine runs from within Access. You could also use ordinary DOS batchfiles to achieve the same thing (i've seen it recommended on TekTips a number of times). I think updating using an Access database is better though, because it would allow you to store additional data (like date/time) about your updates. Just my 2 cents... :)

Bye,
Jeroen

A 3d level editor in Delphi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top