Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2007 db continues to increase in size as users update and create records

Status
Not open for further replies.

08211987

Programmer
Apr 20, 2012
187
0
0
US
Hi,
I have an 2007 Access DB that seems normal, has a opening form that has a subform that displays all the records, has links on the subform to go edit the record, has a button to open a blank form with an auto number record id to create a new record, and the database seems to get larger and larger but we can compact it and it takes it down by 3/4 it's size. Both forms display all fields in record so they can edit or add.

We are noticing that it gets slower and slower until we compact it, especially when opening and when clicking dropdowns which are tied to tables. I've also noticed that when no one is in the DB, I'll compact it and look at the size, then compact it without making any change and it gets smaller. I do have alot of VBA code happening but is not that complicated, dropdown logic going against tables, checking who is logged in to see if they can do a function.

Would anyone know of any additional code or settings are required to close the DB so that it does not grow or can compact when other users are in the DB when each user closes the DB? There are only about 55 people who use it and from what I can tell it is opened maybe 45 times a day to make a change to the main table.

Appreciate any help!
CF
 
One thing I would like to add is that I tested added new records but selected a cancel button to close the form so it doesn't create a new record but the size of the file increased anyway, no record was added but the size of the db did.

This is the code to open the form if it is new:
DoCmd.OpenForm "form_PSSA_Tracker_Update", , , , acFormEdit

This is the code if the form is open to edit:
DoCmd.OpenForm "form_PSSA_Tracker_Update", , , "ID = " & IntID, acFormEdit

This is the code if form is open new but cancelled:
If Me.Dirty Then
Me.Dirty = False
DoCmd.RunCommand acCmdUndo
MsgBox "Changes have been cancelled and form will close.", vbExclamation, "Changes cancelled!"
End If

Is there anything that is increasing the size due to it starting to assign a record number but then does the undo>
Thanks,
CF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top