S
scadav
I have setup an OnTimer event on one of my forms. One of the first things
it does is check to see if the db is configured to run the "automatic
check". It does this by checking a flag in the database. If it is
configured to run this check, it will run the procedure. If it is not
configured it will exit the procedure.
Given this db is going to be up all day, after the OnTimer Event time
interval is reached, the system is constantly going to be attempting to run
this procedure. Which leads me to my question...is it possible to prevent
the system from even going to the OnTimer Event if a flag in the db is
configured not to run OnTimer Event? I would rather save events from
firing off if they are unnecessary.
Below is the code I am using:
Private Sub Form_Timer()
Dim sWorkOrderStatusWarningTurnOn As String
sWorkOrderStatusWarningTurnOn = DLookup("[ParameterValue]",
"sys_SystemParameters", "[ParameterID] = " & 4)
'Means the user has turned on the functionality
If (sWorkOrderStatusWarningTurnOn = 1) Then
RemindUser
End If
End Sub
it does is check to see if the db is configured to run the "automatic
check". It does this by checking a flag in the database. If it is
configured to run this check, it will run the procedure. If it is not
configured it will exit the procedure.
Given this db is going to be up all day, after the OnTimer Event time
interval is reached, the system is constantly going to be attempting to run
this procedure. Which leads me to my question...is it possible to prevent
the system from even going to the OnTimer Event if a flag in the db is
configured not to run OnTimer Event? I would rather save events from
firing off if they are unnecessary.
Below is the code I am using:
Private Sub Form_Timer()
Dim sWorkOrderStatusWarningTurnOn As String
sWorkOrderStatusWarningTurnOn = DLookup("[ParameterValue]",
"sys_SystemParameters", "[ParameterID] = " & 4)
'Means the user has turned on the functionality
If (sWorkOrderStatusWarningTurnOn = 1) Then
RemindUser
End If
End Sub