Solved

I need to hide an image on the page footer of my report when pages are larger than 1

Posted on 2011-03-17
4
345 Views
Last Modified: 2012-06-22
When printing my report, I need to hide the footer, image (Image73) when the page number is higher than 1.
I used a macro previously to run on printing the footer section, but I want to use VBA so that the code is embedded in the report.

I tried the following three ways to address the image's visibility.

The errormessage says "Runtime error 424.         Object Required"

Private Sub PageFooterSection_Print(Cancel As Integer, PrintCount As Integer)
    If Me.Page > 1 Then
    '    [Reports]![rptNurseryOrdersConfirmation]![Image73].[Visible] = False
    '    Me![Image73].[Visible] = False
    '    [Image73].[Visible] = False
    Else
    End If
End Sub

Please point me in the right direction.
0
Comment
Question by:Fritz Paul
  • 2
  • 2
4 Comments
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility

  Me.Image73.visible = False

 should do it...

JimD.
0
 

Author Comment

by:Fritz Paul
Comment Utility
It worked,
So just the omittance of the brackets did that?
Will you please give me a hint why that worked?
Thanks
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 250 total points
Comment Utility

   To be honest I can't say as I've never tried it but the correct way.  However it was most likely the [] around the property 'visible'.   [] are to be used in conjunction with objects.

    The other difference is the . instead of the ! after ME.  The "bang" (!) is the old style notation.

   In the past, one always used a bang to denote a reference to an object, and a dot to represent a property or method followed.

  A change in Access/VBA several revs back makes that no longer a requirement.  But while the old notation still works, I have seen times where Access seems to get confused unless you do it the new way.

Jim.
0
 

Author Closing Comment

by:Fritz Paul
Comment Utility
Thanks a lot!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

772 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

10 Experts available now in Live!

Get 1:1 Help Now