Results 1 to 8 of 8
  1. #1
    Coolpapabell is offline Novice
    Windows Vista Access 2007
    Join Date
    Jul 2009
    Posts
    19

    any way to schedule a compress/repaor task?


    If I leave my access application open overnight is there a way to schedule a database compress/repair?
    If not within access, has anyone used a old fashioned script writer to open the database and compress it?
    Maybe even have the database open and close itself doing the compress on shutdown?

    Back end database is just getting too big without regular compression and its slowing up everything.

  2. #2
    Join Date
    Oct 2009
    Location
    Bromsgrove, West Midlands, England
    Posts
    13
    Use windows scheduler to open the BE at a set time ie 01:00 AM
    Set the BE start options to open a form. Set the form open or load events to copy DB and then quit the DB with options to compact and close.
    Ive done this with 2003 but not with 2007.
    If you need VBA for this let me know.

  3. #3
    Coolpapabell is offline Novice
    Windows Vista Access 2007
    Join Date
    Jul 2009
    Posts
    19
    Thank you zigzag!
    1 question before I start testing.
    The database in question is a back end which is opened by other front end application databases that link to its tables.

    When a display form is selected for a database, does the form only open when a user opens the database or would the form also open when another database opens it to use its linked tables?

    Thanks again,
    Ari

  4. #4
    Join Date
    Oct 2009
    Location
    Bromsgrove, West Midlands, England
    Posts
    13
    Front Ends only link into the Backend tables, they don't open it.
    If you had a form in the backend it would only display/open when the DB was opened.
    It's not considered best practice to have a Backend with forms in but I don't consider this to be a problem.

  5. #5
    Join Date
    Oct 2009
    Location
    Bromsgrove, West Midlands, England
    Posts
    13
    Also remember that the backend will not compact and repair if a front end is still open and linked into it.
    All frontends must be closed before a compact and repair will work.

  6. #6
    martyn is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2009
    Posts
    5
    You can use the options and repair and compact everytime you exit access. Located in the tools.

  7. #7
    Coolpapabell is offline Novice
    Windows Vista Access 2007
    Join Date
    Jul 2009
    Posts
    19
    Quote Originally Posted by martyn View Post
    You can use the options and repair and compact everytime you exit access. Located in the tools.
    Is it safe to do this without backing up first? The files are backed up everyday but its a transaction heavy system and doing a recovery is never fun.

    Quote Originally Posted by Zigzag View Post
    It's not considered best practice to have a Backend with forms in but I don't consider this to be a problem.
    Is there a way to have 1 database compact another?

    Thanks again, Ari

  8. #8
    Join Date
    Oct 2009
    Location
    Bromsgrove, West Midlands, England
    Posts
    13
    I create my DBs to Backup every day, each backup is seperate for the day of the week, ie Monday is MYDB(Backup2).mbd, Tuesday is MYDB(Backup3).mbd etc etc.
    I prefer to backup before the compact and repair.

    Is there a way to have 1 database compact another?
    I think there is but I have never used that aproach because you cant campact and repair a DB that you are linked to and if you are not linked to it you might as well get windows scheduler to do it for you.

    These are just my opinions

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Very simple task - create many-to-one realtion
    By ganjan in forum Database Design
    Replies: 3
    Last Post: 06-03-2009, 01:57 PM
  2. Schedule Preparation
    By crapmind in forum Programming
    Replies: 0
    Last Post: 03-08-2009, 09:05 AM
  3. Export Access reports/query results to Outlook Calendar/Task
    By kfinpgh in forum Import/Export Data
    Replies: 0
    Last Post: 02-22-2007, 01:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums