Results 1 to 6 of 6
  1. #1
    SemiAuto40 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    41

    Assigning controls not working

    I have a password/login form with the name control as cbox_User_Login_Name. The the next menu form I assign an unbound text field named txt_user to the value that was in cbox_User_Login_Name by placing this:

    [Forms]![frm_User_Login]![cbox_User_Login_Name]

    in the default value property section. Works fine right... BUT then when I open a 3rd form and try to assign an unbound field to the same string value that I used already in the prior menu form it will not work when I put

    [Forms]![frm_User_Login]![cbox_User_Login_Name]

    in the default value property section like I had done before.



    WHAT THE? Please I'm losing it!

  2. #2
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Is the original Form still open? That's the only thing I can think of. . .

  3. #3
    SemiAuto40 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    41
    Actually the original password login form is closed (best I can tell). The second form frm_Menu works, the third does not. I already tried to make a global string variable to hold the UserName but then I can't reference it to use it.

  4. #4
    SemiAuto40 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    41
    I found that I can get the similar effect by referencing the control on the 2nd form so cosmetically the text field shows the user that is logged in. SO that is OK I guess.

    NOW what all of this has been about is... to make my table which is automatically on its own placing the word "admin" in my UserName field - to instead use the actual login name from an unbound control on my password form. I've read that if the database is not encrypted in Access2010 that CurrentUser() defaults to "admin" and there is nothing in the world that is working for me to remedy that annoying problem!!! But I'm not using CurrentUser() anywhere so that blows my mind.

  5. #5
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    One possibility is to create a local table that stores the current user's name in a field.

    Then, when someone logs on successfully, their name is saved to the Table which can then be referenced from anywhere.

  6. #6
    SemiAuto40 is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Jul 2011
    Posts
    41
    Your plan makes more sense with using the user table for what I want to do. Thanx that helped.

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

Similar Threads

  1. Assigning value to an image
    By cdzajp in forum Forms
    Replies: 1
    Last Post: 06-16-2011, 12:05 PM
  2. Assigning an Automatic PO #
    By nag3397 in forum Access
    Replies: 1
    Last Post: 01-27-2011, 02:22 PM
  3. Ranking and assigning a Value
    By loopyl00 in forum Access
    Replies: 0
    Last Post: 01-11-2011, 12:14 PM
  4. assigning probability
    By TheShabz in forum Programming
    Replies: 1
    Last Post: 05-06-2010, 12:50 PM
  5. Replies: 1
    Last Post: 09-28-2009, 05:21 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