SgiGod
February 29th, 2000, 02:12 PM
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.
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.