Display a report field under specific conditions only?

ZBKAI189

Registered User.
Local time
Today, 00:07
Joined
Aug 4, 2009
Messages
26
My database tracks quality assurance inspections. I have a report that shows the results of each inspection for a queried time period. There are three spots on the report for inspection nonconformities. Currently, all three fields appear on the report, whether a nonconformity was assigned or not. I want to set a condition that will allow only those fields to display that actually have a nonconformity assigned. So, if Noncon1=True the report will display applicable information for noncon1, if it is false it will not display the fields. Yes? No?
 
ZBKAI189,

You can use code in the On Format event of the section of your report where the controls are that you want to have visible only in certain conditions.

Assuming that the field that you want to use as the criteria is also in your report (even if it is already visible) you can use code like the following:

If me.NameOfTrueFalseControl = false then
me.NameOfControlYouDoNotWantToSee.Visible = false
else
me.NameOfControlYouDoNotWantToSee.Visible = true
endif
 

Users who are viewing this thread

Back
Top Bottom