Selecting Event Logs
I am trying to use WMI to read the Security Event Log for specific Event ID's and a date range... the following Select statement works properly using the Logfile= 'Security' and Date range, but ignores the Event ID's.
strSQL = "Select * from Win32_NTLogEvent Where Logfile = 'Security' And EventCode = 529 Or Envent Code = 530 And TimeWritten >= '" & dtmStartDate & "' and TimeWritten < '" & dtmEndDate & "'"
Does anyone have any ideas?
|