"Presto" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Access 2003 macro nubie here.
>
> I have to copy two files from a network location. Both are Access
> Databases that need to be stored locally,
> then run one of them.
>
> It is currently done via a DOS batch file called by a macro, but I feel
> this is a bit clumbsy.(the fewer files the better)
> I would like to be able to do this directly within the macro.
>
> So in a nutshell :
> 1. Copy \\networkpath\mydatabasefile1.mdb and paste to c:\pcdata
> 2. Copy \\networkpath\mydatabasefile2.mdb and paste to c:\pcdata
> 3. Run c:\pcdata\mydatabasefile1.mdb
>
Are you willing to try/use code in place of a macro?
The vba code to do the above is:
FileCopy "\\networkpath\mydatabasefile1.mdb",
"c:\pcdata\mydatabasefile1.mdb"
FileCopy "\\networkpath\mydatabasefile2.mdb",
"c:\pcdata\mydatabasefile2.mdb"
Application.FollowHyperlink "c:\pcdata\mydatabasefile1.mdb"
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
(E-Mail Removed)