Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Question about the CurrentUser() function

Status
Not open for further replies.

kjspear

Programmer
Feb 13, 2002
173
US
Hello everyone,

O.K., I put the =CurrentUser() in the DefaultValue in the textbox property of the form. When I run it, the textbox displays the current user. That's good. But for some reason it will not go onto the table field. If I input it manually then the value of Current User field will appear in the underlying table. Why doesn't it do the same with the =CurrentUser() function?

Am I missing a step?

Thanks
KJ
 
KJ,
Because, dear Henry, the field is UNBOUND.
You'll need to bind this field to the underlying query/table and then write one line of code to update it - probably in the On Current Event for the Form.
Code:
myControl = CurrentUser()
Cheers.
 
O.K., this is what I did. I simply typed 'Expr1: CurrentUser()' in the Field of the
Append Query and had it append to the field of the other table. It's amazing how the simplest things can be the most difficult.

Thanks
KJ
 
If you can use CurrentUser(), to disply a single user, Is there a property to show all the users who have an active instance of the database open, in a multi-user environment?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top