Link to home
Create AccountLog in
Avatar of XGIS
XGISFlag for Australia

asked on

Is there a limit to how many images can display in an MS Access 2003 Report.. Memory?

I am trying to generate a report with at least 10 folder based images. < 100kb each. The code I am using is as follows;

With only five photos the report worked fine but add another 5 and its lost with the good ole error 2220 "....cant open the file..."

This combined with the 55cm report length limitation make it difficult to render an image based report.


Dim strImagePath1 As String
strImagePath1 = "E:\Websites\XGIS\X.COM\X.COM\App_Website\App_Images\Site\Image1\" + Me.Image1
Me.imgImage1.Picture = strImagePath1

Dim strImagePath2 As String
strImagePath2 = "E:\Websites\XGIS\X.COM\X.COM\App_Website\App_Images\Site\Image2\" + Me.Image2
Me.imgImage2.Picture = strImagePath2

Dim strImagePath3 As String
strImagePath3 = "E:\Websites\XGIS\X.COM\X.COM\App_Website\App_Images\Site\Image3\" + Me.Image3
Me.imgImage3.Picture = strImagePath3

Dim strImagePath4 As String
strImagePath4 = "E:\Websites\XGIS\X.COM\X.COM\App_Website\App_Images\Site\Image4\" + Me.Image4
Me.imgImage4.Picture = strImagePath4

Dim strImagePath5 As String
strImagePath5 = "E:\Websites\XGIS\X.COM\X.COM\App_Website\App_Images\Site\Image5\" + Me.Image5
Me.imgImage5.Picture = strImagePath5

Dim strImagePath6 As String
strImagePath6 = "E:\Websites\XGIS\X.COM\X.COM\App_Website\App_Images\Site\Image6\" + Me.Image6
Me.imgImage6.Picture = strImagePath6

Dim strImagePath7 As String
strImagePath7 = "E:\Websites\XGIS\X.COM\X.COM\App_Website\App_Images\Site\Image7\" + Me.Image7
Me.imgImage7.Picture = strImagePath7

Dim strImagePath8 As String
strImagePath8 = "E:\Websites\XGIS\X.COM\X.COM\App_Website\App_Images\Site\Image8\" + Me.Image8
Me.imgImage8.Picture = strImagePath8

Dim strImagePath9 As String
strImagePath9 = "E:\Websites\XGIS\X.COM\X.COM\App_Website\App_Images\Site\Image9\" + Me.Image9
Me.imgImage9.Picture = strImagePath9

Dim strImagePath10 As String
strImagePath10 = "E:\Websites\XGIS\X.COM\X.COM\App_Website\App_Images\Site\Image10\" + Me.Image10
Me.imgImage10.Picture = strImagePath10

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Alan Warren
Alan Warren
Flag of Philippines image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of XGIS

ASKER

Thankyou for that,
I usually do this in sql, and it works fine. Whil the report renders the images do not. It worked for the first image, and then stops for the second image. The result is unreliable at best as it worked with 5 but then not with 2.

Below is the refined code where imgImage# is the image control name and img# is the query path.

Me.imgImage1.Picture = img1
Me.imgImage2.Picture = img2
Me.imgImage3.Picture = img3
Me.imgImage4.Picture = img4
Me.imgImage5.Picture = img5
Me.imgImage6.Picture = img6
Me.imgImage7.Picture = img7
Me.imgImage8.Picture = img8
Me.imgImage9.Picture = img9
Me.imgImage10.Picture = img10

Open in new window


The sql is;
 
img2: "E:\Websites\XGIS\X.COM\X.COM\App_Website\App_Images\Site\Image2\" & [Image2]

Open in new window


Any ideas. I have checked and the images do exist in the folder. The reason for the folders is that there are at least 500 images destined for each folder.
SOLUTION
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of XGIS

ASKER

Thank-you Jeff for that sample I will test it now.  By no means was i planning to render any more than one report at a time, so a max of a dozen small images and most likely on the local machine on less than 10 pages total. I will provide some feedback soon.
Avatar of XGIS

ASKER

Thankyou for your time