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

Attachment Picture in Report

Status
Not open for further replies.

ck1999

Technical User
Dec 2, 2004
784
US
I cannot get a picture to show in my report.

I have a tblpictures


[pre]Field 1 pictureid
Field 2 picturename
Field 3 picture <-- this shows as a paperclip in table[/pre]


I have an attachment control with control source
Code:
"SELECT tblpictures.picture.FileData
FROM tblpictures
WHERE (((tblpictures.[picturename])='corrosive'))"

It does not work

Have also tried
Code:
"SELECT tblpictures.picture
FROM tblpictures
WHERE (((tblpictures.[picturename])='corrosive'))"

Property of "Display As" is Image/icon

it shows an emtpy box. Table name is correct and fieldname is correct. Have replace . with ! and that had no affect.

When I run an sql datasheet view on
Code:
"SELECT tblpictures.picture
FROM tblpictures
WHERE (((tblpictures.)='corrosive'))"
I get the paperclip in a cell and can double click to open


What I am I doing wrong.

Thanks

Chris
 
I doubt you can make a control source a select statement. You can only do that with rowsources. Why not make the form bound and then just set the control to the filedata field. I you have to have a different rowsource for the main form than put the attachment control inside a subform control.
 
I am having three or 4 picture put in different places on report. Is there away in vba?


Chris
 
Sure, but you need to explain in better detail. How are the pictures saved, attachment, linked, ole etc? What pictures are you trying to show in relation to the report. How is the report set up?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top