I have set up a database that is beening used by several other users.
What I would like to do is to write a macro or VBA so that when the program
is being shut down, it will do a compile and repair automaticaly.
Is this possible?
The program is set up so that the basic toolbars are not available for the
users, so anyone login as a user would not be able to access the button on
the toolbar.
Can anybody help?
Hi
Someone gave me this function:
Public Function AutoCompactApplication()
Dim s
Dim strProjectPath As String, strProjectName As String
strProjectPath = Application.CurrentProject.Path
strProjectName = Application.CurrentProject.Name
filespec = strProjectPath & "\" & strProjectName
s = CLng(FileLen(filespec) / 1000000) 'convert size
If s > 20 Then 'edit the 20 (Mb's) to the max size you want to allow
your app to grow.
Application.SetOption ("Auto Compact"), 1 'compact app
Else
Application.SetOption ("Auto Compact"), 0 'no don't compact app
End If
End Function
Call the function when your DB closes down.
>I have set up a database that is beening used by several other users.
>
[quoted text clipped - 8 lines]
>
>Can anybody help?
Qdxss2b - 24 Oct 2007 20:23 GMT
Thank you. I will give that a try.
>Hi
>
[quoted text clipped - 31 lines]
>>
>>Can anybody help?