Results 1 to 2 of 2

Thread: Updating records in a database

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 1999
    Location
    Selma, NC, USA
    Posts
    25

    Post

    Can someone help me out with this code?

    Dim sFile As String
    Dim db As Database
    Dim rs As Recordset
    With dlgCommonDialog
    .DialogTitle = "Choose member picture"
    .CancelError = False
    .Filter = "BMP Files (*.BMP)|*.BMP"
    .ShowOpen
    sFile = .FileName
    End With
    frmMembers.Image1.Picture = LoadPicture(sFile)
    frmMembers.lblPicturePath.Caption = sFile
    Set db = OpenDatabase(App.Path & "\Members.mdb")
    Set rs = db.OpenRecordset("MemberInfo", dbOpenTable)
    rs.Edit
    rs!PicturePath = sFile
    rs.Close

    Gid.

    PS. What I am trying to do is update the DB with the path to the NEW picture chosen.

  2. #2
    New Member
    Join Date
    Nov 1999
    Posts
    10

    Post

    Why don't you add this code
    rs.update before rs.Close
    See if this one help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width