Results 1 to 3 of 3

User to upadate Password Form

  1. #1
    libraccess's Avatar
    libraccess is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Napier New Zealand
    Posts
    129

    User to upadate Password Form

    OK tblSupervisor has lngUserID PK - StaffName text - strUserPass - text

    I have a log on form where a cmdbtn gives the user an option to update their password. (After logging in) This opens a frmUserPassword which has 4 unbound controls,
    1 : PW_lngUserID which is populated by vba from the LogOn form (same as lngUserID)
    2 : PW_LoggedOn which is the StaffName " "


    3 : PassOne User Enters New password
    4 : PassTwo User confirms New Password

    and a Confirm Button which I am trying to update tblSupervisor[strUserPass with the new password by using an update query
    using criteria [Forms]![frmUserPassword]![PW_lngUserID] and [Forms]![frmUserPassword]![PassTwo] as the Update for strUserPass
    as well as other attempts but I'm starting to mutter and it is time to ask for suggestions as I could be heading the wrong direction

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    48,351
    Why isn't working - error message, wrong results, nothing happens? Should show your attempted code.

    If tblSupervisor is the form RecordSource and set on the user's record, simply:

    If PassOne = PassTwo Then
    Me!strUserPass = Me.PassTwo
    End If

    Otherwise, need sql UPDATE action.
    CurrentDb.Execute "UPDATE tblSupervisor SET strUserPass='" & Me.PassTwo & "' WHERE lngUserID=" & Me.PW_lngUserID
    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
    libraccess's Avatar
    libraccess is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2012
    Location
    Napier New Zealand
    Posts
    129
    Hi . I don't know why I Was trying to this with an update qry. I have changed it to you code
    If PassOne = PassTwo Then
    Me!strUserPass = Me.PassTwo
    End If

    plus also I have a bit of code to compare the two new entries and set focus where necessary so all is now good
    Thanks again

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

Similar Threads

  1. Replies: 7
    Last Post: 03-13-2013, 07:34 PM
  2. Replies: 1
    Last Post: 07-24-2012, 06:10 PM
  3. Replies: 1
    Last Post: 06-22-2012, 08:05 AM
  4. Problem with User Login and Password
    By sk88 in forum Access
    Replies: 3
    Last Post: 12-16-2011, 08:11 AM
  5. Password Form
    By hitesh_asrani_j in forum Forms
    Replies: 1
    Last Post: 09-26-2011, 06:13 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
  •  
Tech Forums: Microsoft Office Forums