|
-
February 29th, 2000, 03:12 PM
#1
Help With PictureBox
How can i save the contents of a picture box to a Access DB If the Pic is in the BD allready it will come up in a find or search on my form but when I do a AddNew it won't add it
here is the code I use to get my TextBox to save and the code that i use to get the Picturebox to save (TextBox works Picture1 Don't)
_________________________________________________
private Sub Command4_Click()
''
'' This is to add a new record
''
'on error resume next
set db = OpenDatabase("C:\Program Files\Tracker\Data\data1.mdb")
set rs = db.OpenRecordset("SELECT * FROM bond1 WHERE Last='" & txtFields(15).Text & "';")
rs.AddNew
If txtFields(0).Text > "0" then
rs!BalDue = txtFields(0).Text
End If
If Picture1 > "0" then
rs!PicPath = Picture1
End If
rs.Update
End Sub
_________________________________________________
Thanks in Advance
Donny S.
-
February 29th, 2000, 06:20 PM
#2
Re: Help With PictureBox
This shows you how using ADO. To convert to DAO, I think, requires changing one line:
http://www.freevbcode.com/ShowCode.Asp?ID=485
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
|