Using CurrentUser() in a form?? (1 Viewer)

iddqd

Registered User.
Local time
Yesterday, 21:39
Joined
Jul 28, 2006
Messages
20
It seems to work perfectly, but doesn't actually enter the value in the table. Am I doing something wrong?

This is what my form looks like:





But the corresponding field in my table remains blank :( :

 

Junkee Brewster

Registered User.
Local time
Today, 14:09
Joined
May 21, 2005
Messages
33
Hiya iddqd,

It won't write to table. If you call CurrentUser() in your form using a calculated field, it only "calculates" for the display of that record on your form (or any "=Expression" on a form for that matter).

Make a new field/expression in your query:

FieldNameofChoice: =CurrentUser()

HTH - Junkee :)

P.S. This will not get it to table either, but at least you will have it "written back" on something. You can still use it for reports or manipulation etc - just like a table. It isn't necessary to get it to table. If it is life or death to get it to table, dunno.. you could run some covert append queries?
 
Last edited:

boblarson

Smeghead
Local time
Yesterday, 21:39
Joined
Jan 12, 2001
Messages
32,059
Your control source should be [Logged User] and not =CurrentUser(). Your default would be =CurrentUser(). If you make those changes it will write to the table, as Junkee Brewster's comment about
This will not get it to table either
is not exactly accurate. It's just that you didn't bind the control to the table field when you used the formula instead of the field in the control source.
 

iddqd

Registered User.
Local time
Yesterday, 21:39
Joined
Jul 28, 2006
Messages
20
ah, thanks, this works perfectly!

I have more noob questions about form design now, I'll try to compile them into one thread instead of posting them separately like some sort of an impatient gorilla.
 

Users who are viewing this thread

Top Bottom