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!

Printing to a PictureBox

Status
Not open for further replies.

jsparks

Programmer
Jan 3, 2001
14
US
I'm new to VB, so please bear with me.

I have a text box that the user types a page number into. When the user presses enter, a connection is made to an Access2000 database and a recordset is built with all of the fields for each record that match the page number the user typed into the text box.

I am using "Picture1.Print RSPage!ProductNumber & vbCrLF" to print the product number from the current record in the recordset to a picturebox. Then it moves to the next record and loops, and prints the next record. What I end up with is a list of product numbers in my picturebox.

What I need to do now is display a picture along with the style number. In an HTML/ASP version of this project, I build an image tag from the product number : &quot;<IMG SRC='C:\IMAGES\<%=RecordSet.Fields(&quot;PRODUCTNUMBER&quot;)%>.JPG'>&quot; - I add the location of the file and the filetype to the style number to come up with \PATH\FILENAME.EXT.

The path to the images is always the same, and the filename is always the product number with .JPG on the end.

Any suggestions on how to do this? I was condsidering some sort of an array? The imagename is not a field in the database, but it could be if it's required.

Any help is greatly appreciated, thanks in advance!

Jim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top