How to suppress printing of certain controls?

winterglaive

New member
Local time
Today, 13:53
Joined
May 14, 2006
Messages
5
I believe this has something to do with using VBCode...

I need to suppress the printing of certain controls that are based on a table when one of the controls is null.

My little access book gives me this much:

"Hint: Use the Detail section's Format event, and use assignment statements similar to Me![control name].Visible = True/False, where Me refers to the open form, and True/False means to select the appropriate property setting."

So basically that hint is probably spelling out what I need to do, but I'm lost!
 
Have you tried simply using an IIF statement?

It can be part of the control source property in a calculated control
= IIf([OrderAmount] > 1000, "Large", "Small")

or you can do the VB stuff
Function CheckIt (TestMe As Integer)
CheckIt = IIf(TestMe > 1000, "Large", " ")
End Function

You might also look at the Triple State info that is part of your Access help. I haven't played with it, but that might do you some good too.
 
If your control is in the detail section then on the on format event in the properties (and subsequently VB) do the following
If IsNull(Me.control) then
Me.control.visible = False
else
Me.control.visible = True
 

Users who are viewing this thread

Back
Top Bottom