Results 1 to 4 of 4

Thread: [RESOLVED] Access 2000: Suppress data in Report based on Value

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2002
    Posts
    352

    Resolved [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.

  2. #2
    PowerPoster
    Join Date
    Sep 2005
    Location
    Modesto, Ca.
    Posts
    5,510

    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

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2002
    Posts
    352

    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.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2002
    Posts
    352

    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
  •  



Click Here to Expand Forum to Full Width