[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
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
Medium Priority
?
361 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
[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 58
ID: 35155708

  Me.Image73.visible = False

 should do it...

JimD.
0
 

Author Comment

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

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 1000 total points
ID: 35155871

   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
ID: 35155977
Thanks a lot!
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
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.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

656 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