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
> Turning A Watermark On And Off On A Page By Page Basis, Access 2016    
 
   
mattybrown
post Jun 10 2019, 10:49 AM
Post#1



Posts: 12
Joined: 1-August 18



We're attempting to add a "PAID" watermark to our invoices, depending of course on whether or not the invoice has been paid.

The problem is that whichever event we seem to use, we seem to be setting the Me.Picture property too late for it to have any effect on the first page.

Calling the following code from the PageHeader_Format event works, except for the first page - where it always appears (as it shows at design-time). The PAID watermark in this case was added to the Report.Picture property.

CODE
Private Sub ShowHidePaidWatermark()
  If Me!TotalInvoice <> 0 And Me!AmountPaid = Me!TotalInvoice Then
    Me.PicturePages = 0 'picture appears on all pages
  Else
    Me.PicturePages = 2 'picture appears on no pages
  End If
End Sub


I've also tried a suggestion I found online that uses a PictureBox to display the image behind everything, but because I would need it to straddle a number of sections, it messes up all the formatting and makes the section it's in bigger. Setting Me.MoveLayout to False as I've seen suggested causes the detail section to be printed at the top of the page, over the top of the page header section.

Has anyone seen this issue before and did you find a solution?
Go to the top of the page
 
theDBguy
post Jun 10 2019, 10:52 AM
Post#2


Access Wiki and Forums Moderator
Posts: 75,549
Joined: 19-June 07
From: SunnySandyEggo


Hi,

Welcome to UtterAccess!
welcome2UA.gif

Not sure I see anywhere in your code where you're hiding or showing the image. I was expecting to see you use the Visible property.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
mattybrown
post Jun 10 2019, 11:01 AM
Post#3



Posts: 12
Joined: 1-August 18



Hi theDBguy,

The watermark picture is assigned to the report's Picture property - it's not a PictureBox object on the report.

Changing the report's PicturePages property sets whether or not to display the Picture, so in a way that's setting its visibility.

As I said in my post, I've also tried using a PictureBox and yes, doing it that way, I was changing the Visible property... but since I want a watermark that straddles multiple sections, I couldn't use a PictureBox... unless someone knows of a way to make that method work?
Go to the top of the page
 
theDBguy
post Jun 10 2019, 11:15 AM
Post#4


Access Wiki and Forums Moderator
Posts: 75,549
Joined: 19-June 07
From: SunnySandyEggo


Hi. Thanks for the clarification. Are you able to post a demo version of your db?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
mattybrown
post Jun 12 2019, 09:22 AM
Post#5



Posts: 12
Joined: 1-August 18



I'll see if I can put something together that I can publish on here... bear with me...
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    20th June 2019 - 06:46 AM