Solved

Microsoft Access Report (Image Control Issue)

Posted on 2013-06-26
2
312 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
  • 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

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…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

806 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