Private Sub Cmd_Update_excl_Click()
Dim stSQL As String
Dim response As String
response = MsgBox("Exclude selected items from further review?", vbOKCancel)
If response = vbCancel Then
Exit Sub
End If
DoCmd.SetWarnings False
Me.Dirty = False
stSQL = "INSERT INTO tbl_Excl_Item_Numbers ( ITEM_SEQUENC_NO )" & _
"SELECT tbl_EOS_Rank.ITEM_SEQUENC_NO " & _
"FROM tbl_EOS_Rank " & _
"WHERE (((tbl_EOS_Rank.Select)=True))"
DoCmd.RunSQL stSQL
stSQL = "UPDATE tbl_eos_rank " & _
"SET Excl = True " & _
"WHERE (((tbl_EOS_Rank.select) =TRUE))"
DoCmd.RunSQL stSQL
DoCmd.SetWarnings True
FilterClear
ChkOff
Me.Requery
End Sub
If Nz(DCount("ID", "tbl_EOS_Rank", [Select] = True), 0) Then
SET whatever = 'something'
WHERE TF_Field = True
Define for us the frequency at which you need this run (just once, every time a row is added to the table, every day at midnight, ...)