Lebans Holdings 1999 Ltd.

 Home ] Up ] Feedback ] Contents ] Search ] What's New ] Files & Tips ] 

Image FAQ

RETIRED! September 2009

I have officially retired from all things Access. Please do not send Email requesting support as I will not respond.


Keep all of your questions to the Newsgroups where everyone will benefit!



PrintFailure.zip is an Access97 MDB containing a report that fails during the Access formatting process prior to being spooled to the Printer Driver.

Here is a NewsGroup post of mine containing code showing how to convert the contents of the Image control to a Bitmap file prior to printing. This helps alleviate the "Out of Memory" error that can popup when printing image intensive reports.

From: Stephen Lebans (StephenLebans@mvps.org)
Subject: Re: Reports with potentially 1000's of images
View: Complete Thread (5 articles)

Original Format

Newsgroups: microsoft.public.access.reports
Date: 2002-11-13 13:16:03 PST

Hi Steve, I would add two other items.
1) Turn of the "Importing Image" dialog window via the registry keys as
outlined here:
Make sure you do it for all Image types that you using that contain the

2) Change all of the Images to Bitmaps at runtime. I have been able to
print previously unprintable reports by doing this last step. Here's a
previous post of mine on the subject.

From: Stephen Lebans (StephenLebans@mvps.org)
Subject: Re: Images in Reports
View: Complete Thread (18 articles)
Original Format
Newsgroups: microsoft.public.access.reports
Date: 2002-09-16 18:46:39 PST

Bruce I finally got a chance to test your method last night. It helped
but only with the actual printing and not the Print Preview itself.
 I was able to print the failed Report directly to the printer or to a
disk printer file so that's great! Don't get me wrong, it's still a good
thing because at least you can print the report!

Unfortunately Acess still runs out of resources when you page back and
forth through Print Preview.
I plan to spend some time onthis issue shortly.
Here is the code I use to convert any Jpeg, Gif, or Metafile into a BMP.
Rather than using one of my API solutions I have cheated and set a
Reference to Standard OLE Types type library in order to get at the
SAVETODISK method. But no ActiveX controls are required

Private Sub Detail_Print(Cancel As Integer, PrintCount As Integer)

Private ctr As Long

ctr = ctr + 1

Select Case ctr
    Case 1
     Me.Image10.Picture = CreateBitmapFile("C:\A.jpg")

    Case 2
    Me.Image10.Picture = CreateBitmapFile("C:\b.jpg")

    Case 3
    Me.Image10.Picture = CreateBitmapFile("C:\c.jpg")
    ctr = 0

    Case Else
    ctr = 0

End Select

End Sub

Private Sub Report_Open(Cancel As Integer)
ctr = 0
End Sub

Private Function CreateBitmapFile(fname As String) As String

Dim obj As Object

Set obj = LoadPicture(fname)
If Not IsNull(obj) Then

SavePicture obj, "C:\SL11-52"
End If

CreateBitmapFile = "C:\SL11-52"
Set obj = Nothing

End Function



Keywords: out of memory report convert Jpg Jpeg bitmap



May 23, 2004 Product Update
Rich Text ActiveX control. Version 1.8

Click Here!


Mar 15, 2005 Product Update
MouseHook  Replaces the MouseWheel DLL subclassing solution. Turns On/Off the MouseWheel with one line of code. No DLL registration required. Now supports Logitech mice!

Click Here! 



Back ] Home ] Up ] Next ] 
Stephen Lebans Copyright 2009

Last Modified : 09/11/09 12:03 AM