Hi,
I have this procedure that takes a few seconds. It is very simple inserting a single line of data into a table, so I don't think it should take a few seconds.
How can I speed this up to be near instantaneous?
	
	
	
		
 I have this procedure that takes a few seconds. It is very simple inserting a single line of data into a table, so I don't think it should take a few seconds.
How can I speed this up to be near instantaneous?
		Code:
	
	
	Sub TrackChanges(ByVal TableName As String, ByVal ProductKey As Long, ByVal FieldChanged As String, ByVal ValueChanged As String, ByVal ModifiedBy As String, ByVal ModifiedDate As Date)
    Dim sql As String
    
    On Error GoTo UnknownError
    DoCmd.SetWarnings False
    sql = "INSERT INTO tblTrackChanges(TableName, ProductKey, FieldChanged, ValueChanged, ModifiedBy, ModifiedDate) " & _
          "Values('" & TableName & "', " & ProductKey & ", '" & FieldChanged & "', '" & ValueChanged & "', '" & ModifiedBy & "', #" & ModifiedDate & "#) "
    DoCmd.RunSQL sql
    
endProcedure:
    
    DoCmd.SetWarnings True
    Exit Sub
    
UnknownError:
    OpenErrorForm Err.Number, Err.Description, "PublicSubs", "TrackChanges", ""
    GoTo endProcedure
End Sub