My shutdown routine is in mdlStartup - just ended up that way. Near the end, it's called by the line 'AutoCompactCurrentProject'. Application.Quit follows it.
Code:
Public Function AutoCompactCurrentProject()
Dim fs, f, S, filespec
Dim strProjectPath As String, strProjectName As String
strProjectPath = getApPath
strProjectName = getApName
filespec = strProjectPath & "\" & strProjectName
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(filespec)
S = CLng(f.Size / 1000000) 'convert size of app from bytes to Mb’s
If S > 6 Then
'set autocompact property to compact on close
Application.SetOption ("Auto Compact"), 1
Else
Application.SetOption ("Auto Compact"), 0 'don’t compact app
End If
End Function
above calls these two functions
Code:
Function getApPath() As String
getApPath = CurrentProject.Path
End Function
Function getApName() As String
getApName = CurrentProject.Name
End Function
I don't have anything on the version idea. It was told to me by a workmate, but the gist of it is, when you edit your FE, you hard code the version number in the startup routine and compare to the BE table version value, which you must alter after every update. If matched, you allow entry. If not, you don't, but what information you present at that point depends on how you manage the rest of the process (i.e. if it's a single shared FE vs they each have their own; ability to install files, etc). Because the FE version number is hard coded, I suppose there's no way around having to get a new file if you want in.