Let's try this one instead, I'll modify the other one momentarily, the message box is not firig, but here's on the fires an SQL command...
-
-
Form code:
-
-
'Exit database button closes the form completely
-
Private Sub ExitDataBase_Click()
-
On Error GoTo Err_ExitDataBase_Click
-
'On Load of your form to check all incomplete items
-
Call RunMultiSQL
-
-
Dim intStore As Integer
-
'Count of incomplete items that are past the Expected Completion Date
-
intStore = DCount("[qryOverDueJobs.ID]", "[qryOverDueJobs]", "[qryOverDueJobs.Incomplete] =0")
-
'If count of incomplete items is zero display a certain form
-
In this case, I was setting a checkbox to checked if system info met certain criteria, but the idea is you are runningthe module code from here using Call RunMultiSQL
This should work in VB o VBA, I believe...
-
-
Module code:
-
-
Option Compare Database
-
-
Sub RunMultiSQL()
-
-
DoCmd.SetWarnings False
-
DoCmd.RunSQL ("UPDATE DETData SET Incomplete = True WHERE Emailed = True")
-
DoCmd.SetWarnings False
-
-
End Sub
-
-