
Path names in a database problem
Hello Ric
Don't bind the Picture control to the datacontrol. Instead do this:
Sub Data1_Reposition()
Picture1.Picture = LoadPicture(Data1.Recordset("PicturePath"))
End Sub
You add the error handling for invalid path :-)
--
Ibrahim Malluf
a MS Dev. MVP
_____________________
Malluf Consulting Services
=====================
Read about my horror story
with Compuweb.com
http://www.rt66.com/iymalluf/compuweb.html
Quote:
> I'm working on a VB application that uses a data control linked to an
> Access database. I have a few edit boxes linked to various fields in the
> database, no problem there. My problem is, I have a picture box that I
> want to link to a data field in the same batadase, however that field
> only contains the path name to the jpeg that I want it to display as the
> user moves through the database. When I try to link the picture box
> control to the picture field in the database which actually just
> contains the path to the associated jpeg file as a text string, of
> course I get an error.
> So my question is: how can I get vb to dynamicly display the jpeg files
> in the picture box control as the user moves through the database when
> all I have is a path string in the data field?
> Thanks for any help or sympathy
> Ric Gibson