As you will have seen from Crystal's Post, there are ways of copying open files.
Doing so with Access 2.0 MDB Files frequently resulted in corrupt databases. This seems to be better nowadays with newer MDB Formats.
What's more, contrary to my previous position on this, from Windows versions from XP SP1 onwards, windows provides the Volume Shadow Copy Service which means your file copy will copy a "last saved" copy making it safe from database updates happening during the copy.
Yours, Andrew
--- In MS_Access_Professionals@yahoogroups.com, "AdamF" <runuphillracing@...> wrote:
>
> Got the FileCopy to work (typo in the file path). However, it doesn't work with an open file. The file that's open is a back end .mdb file that others are using. Is there a way around this other than having them manually copy it in Windows Explorer?
>
> --- In MS_Access_Professionals@yahoogroups.com, Crystal <strive4peace2008@> wrote:
> >
> > Hi Adam
> >
> > try this:
> >
> > '~~~~~~~~~~~
> > �� Name "G:\ProdData\File1.mdb" AS "C:\Folder2\MyFile.mdb"
> > '~~~~~~~~~~~
> >
> > Warm Regards,
> > Crystal
> >
> > Learn Access on YouTube
> > http://www.YouTube.com/LearnAccessByCrystal
> >
> > �*
> > �� (: have an awesome day :)
> > �*
> >
> >
> > ________________________________
> > From: AdamF <runuphillracing@>
> > To: MS_Access_Professionals@yahoogroups.com
> > Sent: Monday, August 27, 2012 2:17 PM
> > Subject: Re: [MS_AccessPros] CopyFile method
> >
> > Tried and failed. RT Error 76, Path not found.
> >
> > --- In MS_Access_Professionals@yahoogroups.com, Jeff Jones <jpjones23@> wrote:
> > >
> > > Have you tried a simpler syntax. For example:
> > >
> > > Sub TempCopy()
> > > FileCopy "G:\Folder1\MyFile.mdb", "C:\Folder2\MyFile.mdb"
> > > end sub
> > >
> > > This works fine on my PC.
> > >
> > > Jeff
> > >
> > > ----- Original Message -----
> > >
> > >
> > >
> > >
> > >
> > > Trying to copy and overwrite a set of files from a server directory to a local folder.
> > >
> > > My.Computer.FileSystem.CopyFile( "G:\ProdData\File1.mdb", "C:\CCW\File1.mdb", FileIO.UIOption.AllDialogs, FileIO.UICancelOption.DoNothing)
> > >
> > > I get a compile error, "Expected: ="
> > >
> > > What's missing?
> > >
> > > Adam
> > >
> > >
> > >�
> > >
> > > --
> > >
> > >
> > > Jeffrey Park Jones
> > > Excel, Access, Word, Office Expert
> > > Excel and Access, LLC®
> > > Christopher@
> > > http://ExcelAndAccess.Com
> > > Toll Free 877-392-3539
> > > Direct Line 714-262-6893
> > >
> > > 919-671-9870
> > > 5109 Deer Lake Trail
> > > Wake Forest, NC 27587
> > > jpjones23@
> > >
> > >
> > >
> > >
> > > [Non-text portions of this message have been removed]
> > >
> >
> >
> >
> >
> > ------------------------------------
> >
> > Yahoo! Groups Links
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
>
Selasa, 28 Agustus 2012
[MS_AccessPros] Re: CopyFile method
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar