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.
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
Me.Tag = "MsgSent"
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.