Results 1 to 4 of 4
  1. #1
    Rude Awakening is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Sep 2014
    Posts
    4

    Add "Who added Record" field to form

    Hey Guys


    How can I add an uneditable field on a form to record who added the record?

    So user opens form, adds record, there is a hidden field on the form for their name, OnSave their name is populated in the table

    If their name was recorded from their windows login or something that would be handy.

    I done the same kind of thing with the Created on Date by adding Date() as the default value and Show Date Picker:never.

    Cheers
    RA

  2. #2
    moke123's Avatar
    moke123 is offline Me.Dirty=True
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Ma.
    Posts
    1,879
    I done the same kind of thing with the Created on Date by adding Date() as the default value and Show Date Picker:never.
    You can just have a default value in the table for the above. No need to have it on form

    There are several ways to get a users identity.

    you can use

    Code:
    environ("Computername")
     
    environ("username")
    if you use a log in procedure you can use that also. There are many more.

  3. #3
    Rude Awakening is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Sep 2014
    Posts
    4
    Thanks for the response Monk
    I have tried both and also with = at the beginning and no joy.
    Heres what I have
    Click image for larger version. 

Name:	Capturerrfr.PNG 
Views:	14 
Size:	11.2 KB 
ID:	41615

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    you can't use a function like environ as a default value

    instead assign the value in the before update or before insert event of a form

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 11-14-2019, 11:30 AM
  2. "No New Data Added" on form
    By Niko in forum Queries
    Replies: 14
    Last Post: 11-08-2017, 03:14 PM
  3. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  4. Replies: 1
    Last Post: 01-18-2015, 07:02 AM
  5. Replies: 2
    Last Post: 11-07-2014, 02:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums