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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting the Picture Property

Status
Not open for further replies.

jsparks

Programmer
Jan 3, 2001
14
US
I am using the ADO Data Control to retrieve information about a retail catalog from a database. When the user looks up a record, the details of the record are shown along with the matching image. In my HTML/ASP version of this project I specify the path in an image tag, and then insert the style number for the image from the recordset, and then add .JPG on the end. It looks like this...

<IMG SRC=/IMAGES/'<%=RecordSet.Fields(&quot;STYLE&quot;)%>_D.JPG'>

...I'm basically dropping the style number in the middle of the directory and the file extension. When the loaded style changes, the image changes.


I need to duplicate this in VB6. I have the form created, the ADO Data Control working properly and pulling data from the database. I just can't seem to build the right line of code for the Picture property to get a dynamic image.

Any suggestions? Thanks!

Jim
 
i have looked at and used loadpicture, but am having difficulty writing it to use the stylenumber field as the first part of the image file name and _D.JPG as the last part of the image file name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top