MLH wrote:[color=blue]
> Thank-you sir. I'll have a look at MVP Tony Toews' site.
> But your explanation and David's were quite helpful. I
> gather there's only so much I can do to PREVENT bloat[/color]
What I like to do in most of my apps is run something like the following
in the on open event of my splash form or whatever form I have open with
the application. The controls, txtFE and txtBE are text boxes on my
splash form which show the user what the size of his files are:
Dim lngSizeFE As Long 'Size of front end
Dim lngSizeBe As Long 'size of data file
Dim strFE As String
Dim strBE As String
'file location information
'Front end
strFE = Access.CurrentDb.Name
lngSizeFE = FileLen(strFE)
Me.txtFE = "TCM Program Size: " & Format((lngSizeFE / 1000000),
"#.00") & " MB, " & strFE
'Back end: fGetLinkPath is a Dev Ashish function available from
'the Access Web at
http://www.mvps.org/access/tables/tbl0007.htm
strBE = fGetLinkPath("TBL_GAME")
lngSizeBe = FileLen(strBE)
Me.txtBE = "TCM Current Data File Size: " & Format((lngSizeBe /
1000000), "#.00") & " MB, " & strBE
'Test FE file against a specific size - if greater than
'that size, have an "optimize program" menu item
'become visible. This is simply a copy of the standard
'Access Compact menu item with a caption that says:
'"OPTIMIZE (It is recommended you click this NOW)"
if lngSizeFE > 5000000 then '5 megs is the limit here...
Commandbars("mnuMain").Controls(4).Visible = True
Else
Commandbars("mnuMain").Controls(4).Visible = False
End If
I also have another "optimize" menu item along with a "optimize data
file" menu item in a "Utilities" menu on my main menu. The later menu
item involves compacting the back end (which I usually refer to as a
"data file" for my users). Since most of my projects are Oracle back
ends, I don't usually have the above txtBE data or an optimize back end
menu item.
I've found that when users occasionally have an OPTIMIZE NOW! menu item
yelling at them when they open their front end, that they click it and
take care of compacting their front end.
--
Tim
http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "What's UP, Dittoooooo?" - Ditto