Hi All 
I have the following code on one of my forms which will help me to keep track of any changes that a user makes... this is working perfectly at the moment - a huge thanks to this forum where the code came from (have tweaked to fit my db).
The only thing is, I do not want it to look at ALL controls, I would like to add in an array so it only loops through certain controls on the form. I have tried to put an array in but I cannot for the life of me get it to work? I have arrays with other things that work OK but this one is giving me a huge headache.
I was hoping someone may be able to point me in the right direction to how I would get an array to work with this code....
Public Function AuditTrail(frm As Form)
On Error GoTo Error_Handler
Dim sAuditTable As String
Dim lsSQL As String
Dim sTable As String 'Table where the record is being edited
Dim ctrl As Control 'The control in the form being edited
Dim sFrom As String 'Original Data in the control
Dim sTo As String 'What the original data was changed to
Dim AuditCtrls As Variant
' Skips this procedure if a new record is being entered in the form
If frm.NewRecord = True Then
Exit Function
End If
' Runs through each control on the form and checks for edits/changes
For Each ctrl In frm
Select Case ctrl.ControlType 'Only checks data entry type controls.
Case acTextBox, acComboBox, acListBox, acOptionGroup
sFrom = Nz(ctrl.OldValue, "Null")
sTo = Nz(ctrl.Value, "Null")
If sFrom <> sTo Then
' Gets the required Info
sTable = frm.RecordSource
lsSQL = ""
lsSQL = lsSQL & " INSERT INTO Tbl_Amendments (CompanyRef, OnForm, FieldName, OldValue, NewValue, Who, DateChanged ) "
lsSQL = lsSQL & "VALUES ('" & ICompanyRef & "', '" & frm.Name & "', " & _
"'" & ctrl.Name & "', '" & sFrom & "', '" & sTo & "', '" & SUser & "', '" & Now() & "')"
CurrentDb.Execute (lsSQL)
End If
End Select
Next ctrl
Error_Handler_Exit:
Exit Function
Error_Handler:
MsgBox ("Error No: " & Err.Number & vbCrLf & vbCrLf & "Error Description: " & Err.Description)
Err.Clear
Resume Error_Handler_Exit
End Function

I have the following code on one of my forms which will help me to keep track of any changes that a user makes... this is working perfectly at the moment - a huge thanks to this forum where the code came from (have tweaked to fit my db).
The only thing is, I do not want it to look at ALL controls, I would like to add in an array so it only loops through certain controls on the form. I have tried to put an array in but I cannot for the life of me get it to work? I have arrays with other things that work OK but this one is giving me a huge headache.
I was hoping someone may be able to point me in the right direction to how I would get an array to work with this code....
Public Function AuditTrail(frm As Form)
On Error GoTo Error_Handler
Dim sAuditTable As String
Dim lsSQL As String
Dim sTable As String 'Table where the record is being edited
Dim ctrl As Control 'The control in the form being edited
Dim sFrom As String 'Original Data in the control
Dim sTo As String 'What the original data was changed to
Dim AuditCtrls As Variant
' Skips this procedure if a new record is being entered in the form
If frm.NewRecord = True Then
Exit Function
End If
' Runs through each control on the form and checks for edits/changes
For Each ctrl In frm
Select Case ctrl.ControlType 'Only checks data entry type controls.
Case acTextBox, acComboBox, acListBox, acOptionGroup
sFrom = Nz(ctrl.OldValue, "Null")
sTo = Nz(ctrl.Value, "Null")
If sFrom <> sTo Then
' Gets the required Info
sTable = frm.RecordSource
lsSQL = ""
lsSQL = lsSQL & " INSERT INTO Tbl_Amendments (CompanyRef, OnForm, FieldName, OldValue, NewValue, Who, DateChanged ) "
lsSQL = lsSQL & "VALUES ('" & ICompanyRef & "', '" & frm.Name & "', " & _
"'" & ctrl.Name & "', '" & sFrom & "', '" & sTo & "', '" & SUser & "', '" & Now() & "')"
CurrentDb.Execute (lsSQL)
End If
End Select
Next ctrl
Error_Handler_Exit:
Exit Function
Error_Handler:
MsgBox ("Error No: " & Err.Number & vbCrLf & vbCrLf & "Error Description: " & Err.Description)
Err.Clear
Resume Error_Handler_Exit
End Function