Omit a field if a checkbox is active

setis

Registered User.
Local time
Today, 11:31
Joined
Sep 30, 2017
Messages
127
Hi all,

Is it possible to not showing a specific field in a report based on a query if a checkbox in the same query is active?
 
??? Not sure I understand??

If the recordsource of a report is based on a query, and if that query does NOT include a specific field, then that field will not be available to the report. But I may not be answering your question.
 
the eaiest thing to do us copy the report and rename it. remove the fields you dont want to show. depending on the chkbox display the appropriate repot.
 
??? Not sure I understand??

If the recordsource of a report is based on a query, and if that query does NOT include a specific field, then that field will not be available to the report. But I may not be answering your question.

I have just realized that I should solve this in the query itself, not in the report.

The issue is that I have a checkbox field and a calculated field. The calculated field will always produce a number, but if the checkbox field is active, I want that number to be "0".

The question would be How would the query criteria should be to do something like "if [checkbox] is active; 0; [value1]" does it make sense?
 
if the form is still open when the reoirt is run, makr the Control Source of the field you want to hide to:

=Iif(Forms! yourForm! yourChkbox, Null, [fieldToHide])


before you do this rename the textbox to anything other than its fieldname so you will not run on circular reference error.
 

Users who are viewing this thread

Back
Top Bottom