Solved

Microsoft Access Report (Image Control Issue)

Posted on 2013-06-26
2
311 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
Comment Utility
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
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
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…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now