Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat. The purpose of this eBook is to educate the reader about ransomware attacks.
Sub AuditChanges(IDField As String) On Error GoTo AuditChanges_Err Dim cnn As ADODB.Connection Dim rst As ADODB.Recordset Dim ctl As Control Dim datTimeCheck As Date Dim strUserID As String Set cnn = CurrentProject.Connection Set rst = New ADODB.Recordset rst.Open "SELECT * FROM tblAuditTrail", cnn, adOpenDynamic, adLockOptimistic datTimeCheck = Now() strUserID = Environ("USERNAME") For Each ctl In Screen.ActiveForm.Controls If ctl.Tag = "Audit" Then If Nz(ctl.Value) <> Nz(ctl.OldValue) Then With rst .AddNew ![DateTime] = datTimeCheck ![UserName] = Environ("USERNAME") ![FormName] = Screen.ActiveForm.Name ![RecordID] = Screen.ActiveForm.Controls(IDField).Value ![FieldName] = ctl.ControlSource ![OldValue] = ctl.OldValue ![NewValue] = ctl.Value .Update End With End If End If Next ctl AuditChanges_Exit: On Error Resume Next rst.Close cnn.Close Set rst = Nothing Set cnn = Nothing Exit Sub AuditChanges_Err: MsgBox Err.Description, vbCritical, "ERROR!" Resume AuditChanges_Exit End Sub
If Status = acDeleteOK Then Call AuditChanges("RecordID", "DELETE")
|MS Access 2016 Debugging||7||42|
|MS Access 2007 Count Unique Values in a Group||5||33|
|Dropdown Not In List - not working correctly||11||36|
|How can I solve "The expression you entered has a function that database01 can't find"||25||37|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
16 Experts available now in Live!