|
-
Nov 28th, 1999, 04:17 AM
#1
Thread Starter
Junior Member
Can someone tell me what's wrong with this code and why it doesn't update the database?
Private Sub cmdPicture_Click()
Dim sFile As String
Dim db As Database
Dim rs As Recordset
With dlgCommonDialog
.DialogTitle = "Open"
.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", dbOpenDynaset)
rs.Edit
rs!PicturePath = sFile
Recordset("PicturePath") = Text1.Text
rs.Update
End Sub
GiD
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|