hiding uncheck checkbox in report (1 Viewer)

DaRTHY

Registered User.
Local time
Yesterday, 20:52
Joined
Mar 6, 2015
Messages
90
Hello

I want to hide on my report unchecked checkbox ?

How can i do that ? If i shall write a code, in which event ?? Or can i use in Query Build option ?

I searched on internet and found some answers but they are not useful

(i found this code and updated for my report but still did not work)

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer) (<- what is that ??)
If Me.Skyliner = 0 Then
Me.SkylinerCover.Visible = True
Else
Me.SkylinerCover.Visible = False
End If


quote : http://bytes.com/topic/access/answers/827386-hide-unchecked-checkboxes-report
 

Ranman256

Well-known member
Local time
Yesterday, 23:52
Joined
Apr 9, 2015
Messages
4,337
select the checkbox, press delete.
it you dont want to see it, remove it.
or
SkylinerCover.Visible = Skyliner = 0

but dont put it in FORMAT
put it in ON PRINT
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 11:52
Joined
May 7, 2009
Messages
19,247
you are doing right, dont bother about the parameters in your OnFormat event (you may search them them in the net).
or you can just put makeup on them (white so it appears as if it wasnt there):

If Me.Skyliner = 0 Then Me.SkylinerCover.ForeColor = vbWhite
 

DaRTHY

Registered User.
Local time
Yesterday, 20:52
Joined
Mar 6, 2015
Messages
90
why shall i delete it. I just dont want to see DO NOT CHECKED !!!! Thats mean there is checked options too !
 
Last edited:

plog

Banishment Pending
Local time
Yesterday, 22:52
Joined
May 11, 2011
Messages
11,656
If you aren't deadset on an actual Access checkbox showing then this can be handled logically in the control, not with an event.

You would place a text control on the form and set its control source to this:

=Iif([SkyLiner], "X")

Then when SkyLiner is True an X is shown on the report, if False, nothing is shown. You could even add a border to the control and make it square and it would appear as a checkbox.
 

DaRTHY

Registered User.
Local time
Yesterday, 20:52
Joined
Mar 6, 2015
Messages
90
Ty guys i did it

A: IIf([tbl_name]![Skyliner]=-1;"x")

this is my code and it works. If someone need that
 

Users who are viewing this thread

Top Bottom