Article ID: 103182
Article Last Modified on 5/6/2003
Function IsRuntime ()
On Error GoTo ErrIsRuntime
IsRuntime = SysCmd(6)
ByeIsRuntime:
Exit Function
ErrIsRuntime:
If (Err = 5) Then
IsRuntime = False
Else
Error Err
End If
Resume ByeIsRuntime
End Function
Note that it is necessary to trap for Err = 5, Illegal Function Call,
in case your application is being run in Microsoft Access version 1.0,
which does not support the SysCmd(6) call.
Macro Name Condition Action
-------------------------------------------------
AutoExec Not IsRuntime() MsgBox
... Quit
AutoExec Actions
--------------------------------------------------------------
MsgBox
Message: Invalid setup, run YourAppName setup and try again.
Beep: Yes
Type: Critical
Title: YourAppName
Quit
Keywords: kbhowto kbusage KB103182