<%dim crumb crumb="Dynamic Graphics Overlay" %> Graphic Images in Access Report
Home  Fees/Services  Access Examples  Tutorials  Access Download  Articles  Search  Contact  Privacy  Links
Access Report Examples
Home > MS Access Tutorials > MS Access Report Tutorial<% response.write " > " & crumb%>
<% dim Page_Type Page_Type="Prog" %> <% dim Gnum,Ynum Gnum="6545291261" Ynum="26695" %>

Access Report Design Tutorials

Report Line Counter
Change Line Color
Report Running Sum
Report Page Subtotals
Graphics Overlay
Dynamic Crosstab
Report Mail Merge

Graphic Images in Access Reports

Add Large Graphic Images Into a Report at Run-Time

Have you ever tried to produce a Microsoft Access report that has a complex government or state form overlaid as a image on which you place the data/text fields? If you have had my experience you find that a few 100 kilobytes jpeg image turns into 30 megabytes when inserted into an Access report.  If you have several of these jpg images then soon your database grows to 100's of megabytes in size and gets slow and fragile.

The trick is to dynamically overlay graphic images at runtime. To do this you'll need to line up the data fields using a temporarily inserted picture as shown below:

Dynamically Overlay Images Report

Important points are to get the size of the image just right so that it is not too large for the paper.  Before resizing you must change the Size Mode Property from Clip to Zoom otherwise the image will get distorted.  Once the picture is sized to fit on the paper then we overlay the data fields on to the image at the appropriate locations.  Note that it is best to change the Back Style property of the text fields from Normal to Transparent.  This will make it so the text fields won't obscure part of the form such as the underline in the Name / Address fields.

The next step is to remove the picture - but don't delete it.  Change the Picture Property from the location of the form's image to blank (delete the entry).  Access will change this field to (none).

See below:

Dynamically Overlay Images Access Report

Now, the final step is to write a little bit of VBA code so that the image will be inserted into the report at time of printing:

Option Compare Database.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
    Me.Form_Image.Picture = "c:\access 2000\santen.jpg"
End Sub

Note that this is event is the Format event of the Detail section.

Now, when the report is run you get the form image dynamically inserted into the report:

Overlay Images Access Report

With this technique your database will not bloat up to 100's of megabytes.

Contact Information

Microsoft Access 2013 2010 All Windows Versions

<% Response.write "Copyright 2000-" & year(now) & " Blue Claw Database Design" %>