Function WriteLogRecord(stAction As String, stObject As String, As String)
'----------------------------------------------------
'- Write a record into the Activity Log table -
'----------------------------------------------------
Dim stLogDate As String
Dim stLogTime As String
Dim stSQl As String
stLogDate = Format$(Now, "dd/mm/yyyy")
stLogTime = Format$(Now, "hh:mm:ss")
DoCmd.SetWarnings (False)
stSQl = "INSERT INTO tblActivityLog (UserID, Action, ObjectName, LogDate, LogTime)"
stSQl = stSQl & "VALUES ('" & CurrentUser & "', '" & stAction & "', '" & stObject & "', '" & stLogDate & "', '" & stLogTime & "')"
DoCmd.RunSQL (stSQl)
DoCmd.SetWarnings (True)
WriteLogRecord = "OK"
End Function