user log form

shadowraven

Registered User.
Local time
Today, 20:15
Joined
May 14, 2002
Messages
75
I was trying to create either a tabel or form prefered which will show when a user logged in date time etc i saw the following code but I couldnt work out how to use it.
can someone please provide me with some support

Public Sub ErrorFinder()
Dim LogFile As Integer
LogFile = FreeFile

If fsoCheckDirectory.FolderExists(App.Path & "\Error") = False Then
fsoCheckDirectory.CreateFolder (App.Path & "\Error")
End If

Open App.Path & "\Error\Errorfile.Log" For Append As #LogFile
Print #LogFile, ErrorDescription
Print #LogFile, ErrorFormName
Print #LogFile, ErrorProcedureName
Print #LogFile, Format(Date, "dd-mm-yyyy") & Format(Date, "hh:mm:ss")
Print #LogFile, "********************************************************************"
Close #LogFile
End Sub
 
I use a table called tblAccessLog.

Fields: UserID, LoginDateTime

When the user submit their password to login, a record is written to this table using Now() for DateTime and UserID from my Login form for UserID.
 

Users who are viewing this thread

Back
Top Bottom