Results 1 to 2 of 2
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Report question (2000)

    I have the following code in a text box in the header of my report - ="Time Period Between " & [Start Date] & " and " & [end date].
    The query behind the report is a parameter query with the following code for the date fields - [Start Date] with the criteria of <=[ePlatformDt] Or Is Null and [End Date] with the criteria of >=[ePlatformDt] Or Is Null. Since these parameters can have dates or they can be null, is it possible to hide the text box if these parameters are null?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Report question (2000)

    There are 4 possible situations:
    - Start Date and End Date are both null
    - Start Date is null, End Date isn't
    - End Date is null, Start Date isn't
    - Start Date and End Date are both not null.
    The expression will have to take all 4 situations into account, so it becomes rather long:

    =IIf(IsNull([Start Date]),IIf(IsNull([End Date]),"","Time Period Up To " & [End Date]),IIf(IsNull([End Date]),"Time Period From " & [Start Date],"Time Period Between " & [Start Date] & " And " & [End Date]))

Posting Permissions

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