GiD
Nov 28th, 1999, 05:01 AM
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.
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.