?
Solved

Microsoft Access Report (Image Control Issue)

Posted on 2013-06-26
2
Medium Priority
?
323 Views
Last Modified: 2013-06-26
I have a report where some records have links to images and others do no. I would like to automatically resize an Image Control to eliminate white space. I can't seem to find anything. Any ideas?
0
Comment
Question by:Ei0914
[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 Comments
 

Author Comment

by:Ei0914
ID: 39280109
I tried this and while the resizing works the image appears for all records despite the fact that the PathToImage is blank for many of them:

   Dim FullPath As String
   
    If IsNull(Me.PathToImage) Or Me.PathToImage = "" Then GoTo ExitHere
   
    FullPath = Me.PathToImage

    If Dir([FullPath]) <> Empty Then
        Me.[Image27].Visible = True
        Me.[Image27].Picture = FullPath
        Me.[Image27].Height = 1800
    Else
        Me.[Image27].Visible = False
        Me.[Image27].Height = 0
    End If
    FullPath = ""
0
 

Accepted Solution

by:
Ei0914 earned 0 total points
ID: 39280124
I'M A BOOB! Duh --

Here's the code that works....

Dim FullPath As String
   
    If IsNull(Me.PathToImage) Or Me.PathToImage = "" Then
        FullPath = ""
    Else
        FullPath = Me.PathToImage
    End If
   
    If Me.PathToImage <> "" Then
        Me.[Image27].Visible = True
        Me.[Image27].Picture = FullPath
        Me.[Image27].Height = 1800
    Else
        Me.[Image27].Visible = False
        Me.[Image27].Height = 0
    End If
    FullPath = ""
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

752 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