UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Conditional Formatting Watermark, Access 2016    
 
   
Psycoperl
post Oct 11 2019, 07:06 AM
Post#1



Posts: 432
Joined: 11-March 15
From: Somewhere lost in the NY Subways


I am trying to determine how I can suppress the printing of the report's watermark (a.k.a background image) on even number pages.

I set the watermark/background using the method described in https://www.chimpytech.com/how-to-watermark...-access-report/

However, when trying to find the visible property for the background image I did not find it. So I thought of just changing the background image file path and that did not work.

This is what I have tried. (ATBAS_Letterhead is a global CONST that contains the direct path to the watermark) Suggestions?

CODE
Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)

    If Me.Page Mod 2 = 2 Then
        
        Me.Report.Picture = ""
    Else
        Me.Report.Picture = ATBAS_Letterhead
    End If
    
End Sub


[UPDATE]
If there is no "visible" type property that can be used. is there a way to specify a path to a "blank" watermark image (esentially an empty image that can be used for the additional page?
This post has been edited by Psycoperl: Oct 11 2019, 07:17 AM
Go to the top of the page
 
orange999
post Oct 11 2019, 07:19 AM
Post#2



Posts: 1,999
Joined: 10-February 08
From: Ottawa, Ont, Canada; West Palm Beach, FL


I think you need to change

If Me.Page Mod 2 = 2 Then
to
If Me.Page Mod 2 = 0 Then
This post has been edited by orange999: Oct 11 2019, 07:21 AM

--------------------
Good luck with your project!
Go to the top of the page
 
Psycoperl
post Oct 11 2019, 07:26 AM
Post#3



Posts: 432
Joined: 11-March 15
From: Somewhere lost in the NY Subways


Nice typo catch ... unfortunately, it did not solve the issue as the background is still printing for ALL pages.
Go to the top of the page
 
arnelgp
post Oct 11 2019, 07:42 AM
Post#4



Posts: 1,510
Joined: 2-April 09
From: somewhere out there...


CODE
Dim iCount As Long

Private Sub Report_Unload(Cancel As Integer)
    iCount = 0
End Sub


Private Sub PageHeaderSection_Format(Cancel As Integer, FormatCount As Integer)

    If FormatCount = 1 Then
        
         iCount = iCount + 1
        
         If (iCount Mod 2)  Then
        
            Me.Picture = "ATBAS_Letterhead.png"
         Else
            Me.Picture = ""
         End If

    End If
End Sub

This post has been edited by arnelgp: Oct 11 2019, 08:00 AM

--------------------
Never stop learning, because life never stops teaching.
Go to the top of the page
 
Psycoperl
post Oct 11 2019, 09:24 AM
Post#5



Posts: 432
Joined: 11-March 15
From: Somewhere lost in the NY Subways


thanks
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    14th December 2019 - 02:49 AM