Share via

current user expression

Anonymous
2013-10-04T11:41:53+00:00

I'm trying to make a field in a table have the default value of the current user, so we know who created the record.  I thought it would be CurrentUser(), but that's not working.  I'm sure it's something simple that I'm missing.  Please help.

Thank you!

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

10 answers

Sort by: Most helpful
  1. Anonymous
    2013-10-04T15:57:18+00:00

    That worked!!!  I new it had to something simple that I was missing.  Thank you!!!  :)

    Was this answer helpful?

    0 comments No comments
  2. ScottGem 68,830 Reputation points Volunteer Moderator
    2013-10-04T15:42:06+00:00

    So you need to do it in your form, if you can't do it in your table. I think that's the problem, that CurrentUser() is not usable on the table level. Try setting it as the Default property of the control on your form.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-10-04T14:45:40+00:00

    =CurrentUser() gives an error that it's an invalid expression

    a table field doesn't have an On Current event???

    Was this answer helpful?

    0 comments No comments
  4. ScottGem 68,830 Reputation points Volunteer Moderator
    2013-10-04T14:05:24+00:00

    It automatically changes it to ="CurrentUser" and I just get the text CurrentUser in the field.

    And if you enter

    =CurrentUser()

    If that doesn't work. Try using the On Current event and code like:

    If IsNull(Me.CurrentUser) Then

    Me.CurrentUSer = CurrentUser()

    End If

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2013-10-04T13:49:52+00:00

    It automatically changes it to ="CurrentUser" and I just get the text CurrentUser in the field.

    Was this answer helpful?

    0 comments No comments