+ Reply to Thread
Results 1 to 8 of 8

Auto Fill User Name

  1. #1
    Registered User
    Join Date
    06-26-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    22

    Auto Fill User Name

    I am creating a database that at some point in time may have a couple hundred people inputting information through out the day. I am trying to figure out how to have the User Name box auto filled by the their Windows log in. This data base will be on SharePoint 2007 and I am using Access 2007. I am very new to access and any help is greatly appreciated.

    Thanks in Advance
    David

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Auto Fill User Name

    Look at this link and adapt it to your needs.

    http://www.datawright.com.au/access_..._in_access.htm
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    06-26-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Auto Fill User Name

    Thanks for the link, correct me if I am wrong.

    I am looking at the long set of code in the second example, am I correct by putting that code into a new module and naming it LogChanges.
    I get lost though in where to put the "Call LogChanges" and what to put where they have the parentheses, they have (CustomerID, "Address1")in the example.

    Thanks for the help

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Auto Fill User Name

    Use the names that you have in your database for the Primary Key instead of his Primary ID example of CustomerID. If your control on your form is the same as the field name in your table, then you only need to use the example he shows first.

    You are correct as to where to place the module.

  5. #5
    Registered User
    Join Date
    06-26-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Auto Fill User Name

    Sorry I am a little lost with the terminology for Access,
    When you say Primary ID does that mean my Primary Key which is "Record Item Number". Also what is the control on my form, is that the name the form is saved as.

    Here is a screen shot so you have a better idea as to what I am working with.
    Capture.JPG

    Thanks
    David
    Attached Images Attached Images

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,810

    Re: Auto Fill User Name

    In the example the field Primary ID is the Primary Key. Use your Primary Key.

    In Access, Fields are located in Tables. The corresponding "fields" in a form are called controls.

  7. #7
    Registered User
    Join Date
    06-26-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Auto Fill User Name

    Thank you very much for the help. I have it working mostly, expect I am now getting an error saying;

    Run-time error '2427':
    You entered an expression that has no value.

    So I click debug and this line is highlighted in yellow
    varOld=Screen.ActiveControl.OldValue

    This happens every time I go to an old record, change a fields info and try to save and move to the next.

    Thanks David

  8. #8
    Registered User
    Join Date
    06-26-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Auto Fill User Name

    I got it working thank you for the help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1