Results 1 to 6 of 6
  1. #1
    Join Date
    Dec 2003
    Posts
    13

    Unanswered: Access 2002 question

    I was wondering if it is possible to use a User account name when creating a new record, for example if I'm logged into my database as user Majestic12, and I go to add a new record, I want a field that automaticly uses my user name...

    Can this be done?

    Thanks in advance,
    Mike

  2. #2
    Join Date
    Dec 2003
    Posts
    172
    Majestic12,

    Do you mean your Access security user account, or the Windows user account (like when you log onto your computer)?

    Joe G

  3. #3
    Join Date
    Dec 2003
    Posts
    13
    Originally posted by JoeG
    Majestic12,

    Do you mean your Access security user account, or the Windows user account (like when you log onto your computer)?

    Joe G
    the Access security user account.

  4. #4
    Join Date
    Dec 2003
    Posts
    172
    Got it. I'll leave that to some of the wiser Access security gurus on this forum, then. It's not my best subject.

    Have a great New Years.

    JoeG

  5. #5
    Join Date
    Dec 2003
    Posts
    13
    I figured it out... In case anyone else was wondering the same thing I used CurrentUser() in a modul and assigned it to the BeforeUpdate property.

  6. #6
    Join Date
    Dec 2003
    Posts
    172
    (Ah I knew that one. I should have stabbed at it LOL.)

    As an alternative, you might also consider assigning that to the default value of the control so any new record fills it in such as:

    Default Value (in control's properties window):
    =CurrentUser()

    Good job Majestic12. Thanks for passing that along.

    Joe G
    Last edited by JoeG; 01-02-04 at 13:03.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •