Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004

    Unanswered: Would this timer code cause dbase bloat?

    Although Im running a multi-user environment without a split database, I've done that in the past without the same incredible bloat problem I'm having now. I'm wondering if you guys see anything in this code that runs on the "Main Form" (the form all users work from at all times) which would cause bloat? It runs every 5-6 mins.

    The database starts the day at 7 am around 3.4 megs. It's sitting at 550 megs right now, and if I kick everyone out and compact it, it will drop down to the 3.4 meg range.

    - Jarrett


    Private Sub Form_Timer()
    Dim db As DAO.Database
    Dim snp As DAO.Recordset
    Dim msg As String, intLogoff As Integer

    Set db = CurrentDb
    Set snp = db.OpenRecordset("Settings", dbOpenSnapshot)
    intLogoff = snp![logoff]

    If intLogoff = True Then
    If Me.Tag = "MsgSent" Then
    Application.Quit (acQuitSaveAll)
    Me.Tag = "MsgSent"
    DoCmd.OpenForm "frm_ExitNow"
    End If
    End If

    DoCmd.SetWarnings False
    DoCmd.RunMacro "uploads"
    DoCmd.SetWarnings True

    End Sub

  2. #2
    Join Date
    Sep 2001
    Chicago, Illinois, USA
    What's in the macro "Uploads" ?

    What code is in "frm_ExitNow" ?

    Are any maketable queries run in either of these ?

  3. #3
    Join Date
    Mar 2004
    I was getting ready to come back and reply to myself with the solution for those interested. The main problem was with the uploads macro, which basically was appending records to a status table but was using a "Warnings False" tag to ignore key violations and past anything that was not a key violation. This apparently caused some serious bloating. Now that I modified the queries to only paste append new records each time, the database has (dramatically) stopped growing.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts