|
-
Jan 11th, 2008, 04:15 PM
#1
Thread Starter
Hyperactive Member
[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.
-
Jan 12th, 2008, 01:57 PM
#2
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
-
Jan 14th, 2008, 11:02 AM
#3
Thread Starter
Hyperactive Member
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.
-
Jan 14th, 2008, 11:39 AM
#4
Thread Starter
Hyperactive Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|