Results 1 to 2 of 2
  1. #1
    anwaar is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2011
    Posts
    18

    Update Particular Record

    I have two controls on Access Form, one is combobox which have all usernames and second a textbox contains passwords. Now I locate password in textbox through"Private Sub username_Change()" event procedure. Password located successfully.



    Now the problem is if I update password of that particular username (located through above procedure) using button and code

    Code:
    Private Sub UpdatePassword_Click()
    DoCmd.RunCommand acCmdSaveRecord
    End Sub
    It update first record of the table where username and passwords are saved instead of the password of that particular username (located earlier).

    Please help me to resolve this problem.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    It would probably help to see your other code. The code you posted will save whatever record is displayed on the form, which doesn't sound like what you want.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Allow Read or Update dep on record
    By AndreT in forum Forms
    Replies: 2
    Last Post: 07-31-2011, 09:46 PM
  2. same form for new and update record
    By lizu in forum Forms
    Replies: 3
    Last Post: 06-20-2011, 08:34 AM
  3. Update Record button
    By Steven.Allman in forum Forms
    Replies: 1
    Last Post: 02-16-2011, 02:15 PM
  4. trying to update a record
    By mrsgwen in forum Access
    Replies: 1
    Last Post: 02-02-2011, 10:35 AM
  5. Update new record when leaving form
    By jpkeller55 in forum Access
    Replies: 6
    Last Post: 09-08-2010, 06:35 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