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

Displaying Images into a report-problem importing

Status
Not open for further replies.

l28

Technical User
Apr 17, 2002
5
0
0
US
Hi- I am importing images ito my report by using VB code that goes out and finds the path to the file and pull in the image. When I select to run my report, it has to import each picture during the process. It seems Access will not accept jpg files over 200KB if I am importing images for 4-5 records. My access database is on my hard drive. Just wondering if there are limitations that I am not aware of. My report is useless if I can't pull in the images. Please Help!
LLK
 
HI... SOUNDS LIKE YOU COULD HELP ME!!!
I NEED TO GET PICTURES INTO FILTERED RECORDS IN MY REPORT
......AND I DONT KNOW HOW.
IN MY FORMS I USE A LINKED FIELD WITH NO PROBLEM
I THOUGHT ABOUT USING AFORM WHICH LOOKS LIKE A REPORT BUT WHEN I PRINT IT ONLY PRINGS IN THE FIRST PICTURE IN THE RECORD SET.....
ANY IDEAS TO GET ME GOING?
 
KIMBOZZZ- I created a table to link in my report called Image table. In it, I have a field called master-key that contains the number I've assigned to each record record in my database. The second field is called External File Location. Here, I put in the path to where my image is stored. I have a image box in my report which contains a name. You can name it whatever you want. My image is located in the detail section of my report. So, I have to go to the properties of my detail section and in the On Format field select "Event Procdure". Below is the code I had to put in the report. The path C:\pcmw...allows for a defualt image to be used if my record did not have a path in the External File Location. You will also need to create a text box named External File Location in the report design. I put mine next to the image box. This was set up for a report in which each and every record contains an image. I'm not sure if this is what you need, but I hope it helps.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
If Len(ExternalFileLocation) <> 0 Then
Image64.Picture = ExternalFileLocation
Else
Image64.Picture = &quot;C:\pcmw\ImageNOF.bmp&quot;
End If
End Sub
 
THANKS FOR THAT .....
I'M DUMB AND CANT MAKE IT WORK...
MY PIC FIELD IS CALLED IMAGE117 ....
MY TEXT FIELD CONTAINING THE IMAGE PATH IS CALLED PICPATH
AND THE TABLE IS NEVER NULL AS AT STARTUP A QUERY FINDS ALL NULL FIELDS AND UPDATES THEM TO A DEFAULT IMAGE PATH UNLESS THEY ARE MARKED AS HAVING BEEN SHOT IN WHICH CASE THE IMAGE PATH IS GENERATED BY A CONCATANATION OF VARIOS FIELDS...
THIS WORKS GREAT!
SO I GUESS I DONT NEED THE IF STATEMENT WHICH IS WHERE THE DEBUGGER JUMPS IN EVERY TIME...
I'VE TRIED USING YOUR FIELD NAMES TO MAKE IT EXACT BUT THE LEN FUNCTION BIT IS WHERE IT HIGHLIGHTS
BIT MORE HELP WOULD BE APRECIATED IF YOU'VE GOT THE TIME...
THANKS AGAIN....KIMBO
 
Hi KimBozz- Make sure you create a text box next to the image box in the design view of your report. The properties of the text box need to be named PICPATH along with the Control Source Field named PICPATH. It must be typed exactly as you named the filed in the image table. You do not have to have a default image. That is just so that if you had a blank field, it could display an image containing a message, &quot;no image on file&quot; for example. But, it is not necessary. See if that helps.
Have a great day!
l28.
 
thanks for the help ...i've sorted it now and it works fine ....next is a multiple pictur version!! oh my my!!
 
Yea I am having the same type of problem. Takes too long when you have 50 pages to print with 20 images on each page. There has to be another way to do it and I am not going to embed them becuase my DB file will be like 1GB. If you figure it out, lemme know.

Thanks

InnerSlice
 
I've spoken with a rep for Microsoft Access, and she told me that when you have a lot of pages, you will run into problems trying to import images. She said it is an Access issue that cannot be corrected in this version. And, she did not have a better solution.
So, I choose what pages it prints, maybe 25 pages at a time. A pain, but for now, it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top