PDA

Click to See Complete Forum and Search --> : [RESOLVED] Access 2000: Suppress data in Report based on Value


easymoney
Jan 11th, 2008, 03:15 PM
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:

wes4dbt
Jan 12th, 2008, 12:57 PM
You could use an "immediate if" in a select query. Then use the query as the data source for your report.
select field1,field2,iif(field3='Active',' ',field3) as somename from yourtable

Good Luck

easymoney
Jan 14th, 2008, 10:02 AM
Okay, I will try and see if I can make that work and post back. Thanks. :)

easymoney
Jan 14th, 2008, 10:39 AM
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: