Results 1 to 5 of 5
  1. #1
    prasadmng555 is offline Novice
    Windows Vista Access 2010 32bit
    Join Date
    Nov 2014
    Posts
    4

    Displaying login in name in the field of next form

    Hi,

    I have login form created which I login with user name. I want to display the same login name in a field of a form after I login.

    Can someone help me on this plz.

    Many thanks,
    PK

  2. #2
    Join Date
    Jun 2015
    Location
    Wales. Land of the sheep.
    Posts
    1,228
    Assign it to a global variable.

    Its almost like I know what I'm doing. No, but seriously. If that value is held as a global variable once logged in, you can use it throughout your database.

    I'm no expert and I probably wont be much use beyond this, but if you're stuck at least you have something to look at now.

  3. #3
    cbende2's Avatar
    cbende2 is offline Competent Performer
    Windows 7 32bit Access 2013
    Join Date
    Jun 2014
    Location
    Louisiana
    Posts
    370
    It can be as simple as minimizing the login form after logging in, and using-- Forms![YourLoginForm]![YourUsernameTextBox] wherever you want that value.

    If FormA is your login form, and FormB is your form you want to display your login username in the textbox named MyTextbox, set the MyTextBox control source " =Forms!FormA![YourUsernameTextBox]"

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850

  5. #5
    redekopp is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2015
    Location
    Saskatoon
    Posts
    108
    we use code like this. the Login button code has:
    Code:
     TempVars.Add "EmpCode", Me.cboEmployee.Value
            DoCmd.OpenForm "Switchboard"
    cboEmployee is your usename.

    on the "switchboard" we created a text field with the control source =[TempVars]![EmpCode]

    Hope that helps!

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

Similar Threads

  1. Replies: 2
    Last Post: 04-17-2015, 10:59 AM
  2. Replies: 4
    Last Post: 05-29-2012, 01:32 PM
  3. Replies: 1
    Last Post: 05-09-2012, 02:22 PM
  4. Displaying a Field Value From Another Form
    By Lupson2011 in forum Forms
    Replies: 5
    Last Post: 08-31-2011, 08:19 AM
  5. Form field not displaying in query
    By Valeda in forum Queries
    Replies: 2
    Last Post: 05-05-2006, 10:08 AM

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