Solved

Image in Access Report

Posted on 2014-04-14
4
411 Views
Last Modified: 2014-04-14
Have a Access Report where the record source is a table (Tbl_xyz) having 2 text fields.

Tbl_xyz records are:

ID    Field 1     Field 2
1     Blue         (Null)
2     Green       c:\green.jpg
3     Brown      (Null)

Would like report to list all records in Detail section, but for record #2 display the image located in Field 2 and then proceed to contents of record #3.
0
Comment
Question by:clock1
  • 2
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
Flyster earned 500 total points
ID: 40000404
You can insert a picture control in the detail section and then make the control source Field 2.

Flyster
0
 

Author Comment

by:clock1
ID: 40000419
Flyster

By inserting a image control in the detail section, the image frame creates additional space in those lines where there is no image. Is there someway to conditionally make that image frame visible? In other words, records #1 and #3 don't have images.  I don't want the space created by the image frame to be visible. Thanks!
0
 

Author Comment

by:clock1
ID: 40000502
Almost There!  Just need an assist with the additional space created by the image frame. Thanks
0
 
LVL 22

Expert Comment

by:Flyster
ID: 40000601
Try this code in the Format section of the detail section:

If Len(Me.Field2.Value) > 0 Then
  Me.Detail.Height = 1000
  Me.Image1.Height = 500
Else
  Me.Detail.Height = 500
  Me.Image1.Height = 250
End If

Just change Image1 to the name of the image control in your report and the height values to what you need.
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question