John,
Sorry John but I guess I'm a bit lost. I'm not too keen on making code so I made a new module and inserted the DBEngine.CompactDatabase. When the debug ran I got Compile error, Invalid Outside Procedure.
Also, if when compacting a db Access does not make a separate copy of a database, how can that be used as a backup since there is no duplication?
Russ
Russ-
The user won't see the back end. This can happen from the front end as long as there are no bound forms or reports open. The code could run from your main "switchboard" that is probably unbound. You'll get a trappable error if the command can't get exclusive access to the backend during the "compact" that's doing the copy. Note that Access never compacts a database into itself. It compacts into a new database, then deletes the old and renames the new if successful. So, CompactDatabase run by itself creates a clean "copy" of the database.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Rusty
Sent: Wednesday, September 25, 2013 4:39 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] Backing up backend
John,
I can backup the backend simply with Access by opening the backend, but I would rather not have a user go through all that. Actually I only want them to access the data through the front end.
Russ
On 9/24/2013 12:45 PM, John Viescas wrote:
Rusty-
You can use DBEngine.CompactDatabase to make a backup copy, but nobody can
have the database open (which is what you want anyway) when you run it.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Rusty
Sent: Tuesday, September 24, 2013 7:29 PM
To: ms_access_professionals@yahoogroups.com
Subject: [MS_AccessPros] Backing up backend
Access has a way of backing up the front end of a db in the Manage area, but
can the backend, where the real data is, be backed up from the front end
without having to open the backend?
Russ
------------------------------------
Yahoo! Groups LinksNo virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3408 / Virus Database: 3222/6696 - Release Date: 09/24/13
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3408 / Virus Database: 3222/6697 - Release Date: 09/25/13
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (5) |
Tidak ada komentar:
Posting Komentar