More issues with watermarks

gblack

Registered User.
Local time
Today, 23:33
Joined
Sep 18, 2002
Messages
632
OK, I have created a watermark .gif file and I have applied it to a report. The watermark background states that the document is a "DRAFT". It works just fine.

The issues is, I cannot figure out how to programmatically hide the watermark or toggle from having a watermark to not having a watermark programmatically.

What I would like to do is set the report to display the watermark as the default setting, but when the Managers actually verify the report as being ready, to prevent the "Draft" watermark from showing.

I could create two reports, one with the watermark and one without... but it is a very complex report and I would hate to have to make duplicate changes to the report every time a new functionality is requested.

Can I somehow set the me.picture = none and then set it back to the default in some way? If so, what is the code I would use to do this?

Any help is greatly appreciated.

Thanks,
Gary
 
I would assume that you have some sort of flag in your table/query that denotes whether the SLA is final or not. Lets say this is a boolean type field, then what you need to do in the onload of the report is

Me.Watermark.Visible = Not BooleanFlag

This means the the visiblity is the opposite of the record status. So if the SLA is final and the field is True then the draft watermark visability setting is not true, therefore false, and vice versa.

David
 
Yes David,

That is exactly what I want to do, but that code doesn't work...

Me.Watermark.visible isn't recognized I don;t think watermark is understood by access, unless I am missing something...

and

Me.Picture.visible = false

Even though intellisense recoginized me.picture it gives me an "Invalid Qualifier" error when I place this code in the on format details section like so.

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me.Picture.Visible = False
End Sub

Am I putting the code in the wrong place? It seems to me that MS Access doesn't seem to like the .visible qualifier.
 
How dis you insert the watermark in the report. I just tried by inserting a picture. The visible property hides/shows the picture
 
You simply go into the report design.

In thr properties of the overall report is "picture" property. When you click there it will show the elipses "..." locate your picture and click open...

Access sets that picture as your watermark/report background.

HTH,
Gary
 
First, you cannot put the code on the detail section because it applies to all the report sections. What you need to do is to have a "blank" picture that you will use to replace your watermark. Then, on the report open event, put something like this:
Me.Picture = "C:\yourpath\blank.jpg"
 

Users who are viewing this thread

Back
Top Bottom