HELP... Storing & retrieving images in MS Access to be used on VB

04-13-2004, 06:51 AM
I need to create a program wherein I must use only one form and an Access database to store images and information that I would retrieve during runtime. Since I'll be using only one form, if i click a certain button, an image and information should appear, and if I click a different one, another set of images & information must appear. But I don't really know how to do it and whenever I try, I usually get an error "object variable or with block variable not set." What should I do? :confused: :(

04-13-2004, 06:56 AM
Post the code you've tried so far.

04-13-2004, 09:04 AM
Private Sub cmdadd_Click()
If path = Empty Then
MsgBox "no path", vbCritical, "Warning!"
With ado1.Recordset
.AddNew <-- error is always appearing here
.Fields(0).Value = Text1.Text
.Fields(1).Value = Image1.Picture
End With

End If
End Sub

Private Sub cmddelete_Click()
With ado1.Recordset
End With
End Sub

Private Sub cmdfirst_Click()
With ado1.Recordset
Text1.Text = .Fields(0)
End With

path = Text1
Image1.Picture = LoadPicture(path)
Image1.Visible = True
End Sub

*These are the codes I've done so far... It's kinda short because I don't really know what to do...

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum