Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Loading a picture from Access

Status
Not open for further replies.

diarratech

Technical User
Jul 7, 2000
41
FR
I am creating a small picture dictionary using ADO code and I have pbs loading the pictures from Access in a picture box.
When a user click on the combo box, a picture should appear in a picture box with a label with translation.
So far, I have been able to make everything works except displaying the pic.
My program stops here at "WordPics.Picture = mHouse.Picture"
The error msg is object required! So I used the loadpicture
WordPics.Picture = loadpicture (mHouse.Picture) and I still got an error.

Public Sub Fillfields()
lblTraduction.Caption = mHouse.Word
WordPics.Picture = mHouse.Picture
End Sub

Could anybody help me?

Thanks
 
You have to declare the picture as an object.

Use this

dim pic as new stdpicture
pic = mhouse.picture
wordpics.picture = pic

Eradic8or
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top