Logon

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello

Is there anyway on access i can create a logon to a databse so i can track
who logs on and at what time? if there is how would i go about this?

Regards
 
Well, if you have a secured database, you could store the the user logon in
your opening form.

Lets say your opening form is a Switchboard.
You could create a Logon table with 3 fields, LogonId (autonumber) ,
UserName and logonTime.
Then in the Open event of your switchboard, have something like this

Dim rsLogons as DAO.recordset
Set rsLogons = CurrentDb.Openrecordset("Logon")
With rsLogons
.Addnew
!UserName = CurrentUser()
!LogonTime = Now()
.Update
.Close
End With

Hope this helps
Regards
Diarmuid
 
or you can use the name of the Currently logged on user
check www.mvps.org/Access (API section) for the neccessary code

Pieter

Vayse said:
Well, if you have a secured database, you could store the the user logon
in your opening form.

Lets say your opening form is a Switchboard.
You could create a Logon table with 3 fields, LogonId (autonumber) ,
UserName and logonTime.
Then in the Open event of your switchboard, have something like this

Dim rsLogons as DAO.recordset
Set rsLogons = CurrentDb.Openrecordset("Logon")
With rsLogons
.Addnew
!UserName = CurrentUser()
!LogonTime = Now()
.Update
.Close
End With

Hope this helps
Regards
Diarmuid



--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top