Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Public Function SaveHistoryChanges(Optional sTable As String = "", Optional sField As String = "", Optional vValue As Variant = "", Optional lID As Long = 0) Dim sSQl As String, cNtrl As Control If Len(sTable) = 0 Then sTable = Screen.ActiveForm.Name If lID = 0 Then lID = Nz(Screen.ActiveForm.ID, 0) On Error Resume Next For Each cNtrl In Screen.ActiveForm.Controls If (TypeOf cNtrl Is TextBox Or TypeOf cNtrl Is ComboBox Or TypeOf cNtrl Is CheckBox Or cNtrl.ControlType = 107) Then If Nz(cNtrl.Value) <> Nz(cNtrl.OldValue) And cNtrl.Visible = True And cNtrl.Enabled = True Then If Not IsNull(cNtrl.OldValue) And Not (TypeOf cNtrl Is CheckBox) Then If Nz(tLookup("ID", "HistoryChanges", "TableName = '" & sTable & "' and FieldName = '" & cNtrl.ControlSource & "' and TableID = " & lID), 0) = 0 Then sSQl = "Insert into HistoryChanges (TableName, FieldName, Value, TableID)" sSQl = sSQl & " Values ('" & sTable & "','" & cNtrl.ControlSource & "','" & cNtrl.OldValue & "'," & lID & ")" CurrentProject.Connection.Execute sSQl End If End If sSQl = "Insert into HistoryChanges (TableName, FieldName, Value, Initial, TableID)" sSQl = sSQl & " Values ('" & sTable & "','" & cNtrl.ControlSource & "','" & cNtrl.Value & "','" & GetInitial & "'," & lID & ")" CurrentProject.Connection.Execute sSQl End If End If Next End Function
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Limit number of characters returned to 999||9||31|
|ASP Classic Query that needs to display more information||18||33|
|MS Access Query Date Field Not Returning Results for the Correct Date||6||12|
|MS Access Recordset Need Help Setting All Record Values In A Query To False (No)||6||10|