Login capture

J

Jay

Dear All,

i have a MS Access database where users login using their indvidual user
accounts, is there a way to capture the userid and date/time stamp so if the
users adds entries to the database it will capture the login id and the
date/time stamp in a table?

I would apreciate if someone can assist?

many thanks
jay
 
D

Douglas J. Steele

http://www.mvps.org/access/api/api0008.htm at "The Access Web" will give you
the userid.

You simply use the VBA Now() function to get the current date and time.

Put code in the BeforeUpdate event of the form to assign those values to the
appropriate fields in the form's RecordSource.
 
J

Jay

Doug,

thanks for the response, the login i want capture is the database login not
the network, i am not familiar with the programming languages, so if you
could help in a simplest term.

thanks
 
D

Douglas J. Steele

Sorry, for the database login, there's a built-in function CurrentUser()

If you go into the definition for your table, look at the properties for the
fields in question. Set their DefaultValue properties to CurrentUser() and
Now(). (Note that this would not have been possible if you were looking for
the Windows ID, which is what my first response assumed)
 
J

Jay

thank you very much, very helpful

Douglas J. Steele said:
Sorry, for the database login, there's a built-in function CurrentUser()

If you go into the definition for your table, look at the properties for the
fields in question. Set their DefaultValue properties to CurrentUser() and
Now(). (Note that this would not have been possible if you were looking for
the Windows ID, which is what my first response assumed)
 

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