User log

M

Mike

Good afternoon,
I would like to keep track of who logs into my
database. This is what I have done:

Add a table to your database, name it tblLog and add 3
fields: lngID
(Autonumber), strUser (Text), and dteDate (DateTime)

In the Open event of your startupform, add this code:

Currentdb.Execute "INSERT INTO tblLob(strUser, dteDate)
VALUES('" &
CurrentUser & "',#" & Now() & "#)"

When I try and open my form (called VMAQ-1 Ground Training
Database) it tells me that Access cannot find the macro
called currentdb. I have no idea what that means. Please
help if anyone can. Thank you for your time.

Mike
 

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

Top