currentuser method in forms vs. table design

  • Thread starter Thread starter David P. Lurie
  • Start date Start date
D

David P. Lurie

Why can the currentuser method be used as a function for a default field
value within a text box on a form, but not when configuring the field in
table design view?

Is it because the fully qualified object specification for currentuser is
undefined while in table design, but is defined for the form's textbox? I
looked at expression builder as well; it lists currentuser as an available
function when accessed through the properties window of a text box on a
form, but not when accessed in table design.

I need to capture the user last modifying records in several tables, along
with a timestamp. Now() is used for the default timestamp value in the table
design, and propogates to all forms, as expected. Currentuser has to be
specified as the default value for the relevant text box on each separate
form.

Thanks,

David P. Lurie
 
David P. Lurie said:
Why can the currentuser method be used as a function for a default field
value within a text box on a form, but not when configuring the field in
table design view?

Default values in a form are controlled by Access. Default values in a table
are controlled by Jet. Access is "aware of" the CurrentUser() function and Jet
is not. There are lots of expressions that can be used for defaults in a form
that cannot be used at the table level for this same reason.

Remember that one can use an MDB to store data (and thus use Jet) without Access
even being installed on the machine. How would a default value that relied on
an Access function be enforced in such a situation?
 
Back
Top