[RESOLVED] Access 2000: Suppress data in Report based on Value
I have a pretty basic report in an Access db. The only thing I want to change is the following:
I have a TextBox that displays a code 'Active' or 'Inactive' that always prints. The report prints every record that it should, but I would like to suppress printing for the TextBox only if it contains the value 'Active'
In other words, I want all records to print in report, but I only want the TextBox to display a value if it equals 'Inactive'.
It has nothing to do with record selection, just want to clean up the Detail area by showing a message when it is 'Inactive'
Does that make sense, if so how do I do it? Thanks in advance. :wave:
Re: Access 2000: Suppress data in Report based on Value
You could use an "immediate if" in a select query. Then use the query as the data source for your report.
Code:
select field1,field2,iif(field3='Active',' ',field3) as somename from yourtable
Good Luck
Re: Access 2000: Suppress data in Report based on Value
Okay, I will try and see if I can make that work and post back. Thanks. :)
Re: Access 2000: Suppress data in Report based on Value
That worked perfectly. And here I was trying to do it in the detail of the report that was already using a query to fetch data, dun-da-duh!
I went with something like this in my query:
IIf([Rates].[RN]<>'Inactive',' ','TURNED OFF') AS Status
This returns a field named Status that is blank if it says anything but 'Inactive', and if it does contain 'Inactive' returns 'TURNED OFF' when the report is printed.
A sweet and simple solution. Thanks. :wave: