?
Solved

Image in Access Report

Posted on 2014-04-14
4
Medium Priority
?
416 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
Flyster earned 1000 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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

800 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