Jakboi
Death by Access
- Local time
- Today, 12:10
- Joined
- Nov 20, 2006
- Messages
- 303
Hello,
I found this here:
This was in a 2004 post...does anyone have something similiar that may have more bells and whistles since that was 3 years ago? Dont know if something else was made by someone that works better?
Also does this go into a module?
I am looking to automatically compact and repair the Front-Ends on the Users workstations when it reaches a certain size...
If I wanted to change this is this in kilobytes or how would I change this to compact and repair when it reaches say 5 mb. Its currently at almost 2mb now I believe. Dont know what to change in order to change the size that triggers compaction.
Thanks for any insight to this.
I found this here:
PHP:
Public sub subCompact()
On Error goto Err_subCompact
Dim fs, f, ProjectSize, filespec
Dim strProjectPath As String, strProjectName As String
strProjectPath = Application.CurrentProject.Path
strProjectName = Application.CurrentProject.Name
filespec = strProjectPath & "\" & strProjectName
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(filespec)
ProjectSize = Round((f.Size / 1024) / 1024, 2)
If ProjectSize > 30 Then
Application.SetOption ("Auto Compact"), 1
Else
Application.SetOption ("Auto Compact"), 0
End If
Exit_subCompact:
Exit Sub
This was in a 2004 post...does anyone have something similiar that may have more bells and whistles since that was 3 years ago? Dont know if something else was made by someone that works better?
Also does this go into a module?
I am looking to automatically compact and repair the Front-Ends on the Users workstations when it reaches a certain size...
PHP:
ProjectSize = Round((f.Size / 1024) / 1024, 2)
Thanks for any insight to this.