Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Location
    UK
    Posts
    246

    Unanswered: Report, hide fields if other fields don't meet criteria

    Hi,
    I'm trying to hide some fields on a report if certain other fields don't meet a criteria, but all I get is #Error

    The data control source for the field (field1) in question is pretty straight forward

    =iif([field2] = null,null,[field1])

    Can I do it like this or is there a beeter way to hid report fields?

    Regards
    John

  2. #2
    Join Date
    Jun 2004
    Location
    Florida, US
    Posts
    521
    I guess you could use Format Event of the Report's Detail section to make invisible the fields you don't want to show up in the report. I didn't try it, but no reason it shouldn't work.
    ghozy.

  3. #3
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by Sticker
    Hi,
    I'm trying to hide some fields on a report if certain other fields don't meet a criteria, but all I get is #Error

    The data control source for the field (field1) in question is pretty straight forward

    =iif([field2] = null,null,[field1])

    Can I do it like this or is there a beeter way to hid report fields?

    Regards
    John
    Yes ...You can put some code in the Detail_Format event the turns a control invisible ... Ex:

    If IsNull(SomeTextControl.Value) then SomeOtherControl.Visible=False
    Back to Access ... ADO is not the way to go for speed ...

  4. #4
    Join Date
    Feb 2004
    Location
    UK
    Posts
    246
    Excellent Guy's thanks for the adivce. Mike I used your exprssion and it works perfectly

    Cheers
    John

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •