Entering User Logon Into Access

N

Nick hfrupn

Is there any way I can automatically input the User ID of the person logged
on into my Access database?
I am using Windows 2000.

Any help appreciated.

Nick
 
N

Nick hfrupn

I have a table, tbWorkOrder, with a field UserID. when a new recorded is
added I would like to default the user ID of the person adding the record.
Ideally I would like to be able to record the date, time and by whome the
record was created and each time the record was changed but I think this
would be beyond me.
 
L

Larry Linson

"Nick hfrupn"
I have a table, tbWorkOrder, with a
field UserID. when a new recorded is
added I would like to default the user
ID of the person adding the record.

Create a Field to hold the Information, use a DefaultValue of =CurrentUser()
Ideally I would like to be able to record
the date, time and by whome the
record was created

Create a Field to hold the information, and use a DefaultValue of =Now()
and each time the record
was changed but I think this
would be beyond me.

This can only be done if you write a "developed application" that forces
updates to be done through your forms. Default values only apply at the time
the new Record is created, not when it is updated. So you have to set the
last-updated value from VBA code.

Larry Linson
Microsoft Access MVP
 
N

Nick hfrupn

Thanks for your reply. I can use your answer in a form, DefaultValue of
=CurrentUser() but is there any way of this to work in a table?

Regards
Nick
 
Top