Results 1 to 7 of 7
  1. #1
    dlebar is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    4

    Prompt user to enter personal password when ticking Option button

    Good afternoon!

    I have a form in which I collect approvals from two different departments. To approve an item the user selects their name from a combobox, and then tick an option box to indicate approval. The combobox is from table 'Users' and has a query as a source with the following fields, 'UserNum, First, Last, Password'. The 'approval' fields are on table 'Approvals' and are yes/no fields.

    What I'd like to have happen is that the user chooses their name from the combobox and then ticks the option box for approval; when ticked I would like a messagebox to appear asking for the users password based on the name chosen in the combobox.



    Is this even possible?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Certainly. Do you have a table that has user names and passwords?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    dlebar is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    4
    Yes!

    Table: Users
    Fields: Usernum, first, last, password

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Options in order of my preference:

    1. a textbox for the password entry and code checks for value - if null then nag the user with MsgBox to enter

    2. InputBox() function

    txtPass = InputBox("Enter password")

    3. a form used as an input box


    In all cases, suggest the combobox be multi-column and one of the columns (hidden) has the Password field. Then code can reference that column by index. Column index begins with 0:

    If txtPass = Me.comboboxname.Column(x) Then
    'do something
    Else
    'do something else
    End If
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    dlebar is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    4
    Thank you for your suggestions June7, I spent some time yesterday trying to get one of them to work, to no avail. I'm running into problems trying to put the password field into the query.

    The password field is on the users table, utilizing UserNum as the primary key. The combobox is currently setup using my approvals table, which uses ReportNum as the primary key. I think this difference in the primary key is what's causing my issue.

    IN the query I'm attempting to pull 'EngName' and 'OpsName' from the approvals table, and 'first' and 'password' from the Users table. After typing it out I also see that the way I have the names setup may also be a cause. I am going to try making a new table containing only the names of users involved in approvals, and put the password field in that table as well.

    I'll report back on whether or not this works!

  6. #6
    dlebar is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2015
    Posts
    4
    ....aaaaaaand that didn't work.

  7. #7
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Why is combobox for selecting user based on approvals table and not user table?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Seeking a User Friendly enter Button Logic
    By justphilip2003 in forum Programming
    Replies: 4
    Last Post: 05-10-2013, 12:12 PM
  2. Replies: 5
    Last Post: 08-02-2012, 02:05 PM
  3. Replies: 0
    Last Post: 11-22-2011, 09:10 PM
  4. Replies: 13
    Last Post: 07-27-2011, 12:38 PM
  5. Password Prompt
    By thestappa in forum Security
    Replies: 1
    Last Post: 01-28-2010, 09:19 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