Results 1 to 5 of 5
  1. #1
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Null Values (A2K SP3)

    I have a report that prints records by deposit date. The report prints correctly by date. If the deposit date field is blank that record(s) is displayed first but there is no header since there is no deposit date. What would be the correct syntax to put in the Deposit Date header so that if the deposit date field is empty, it will print

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

    Re: Null Values (A2K SP3)

    1. Make sure that the text box you use is not named DepositDate, that will confuse Access.
    2. Is DepositDate a Date/Time field? (I know that it contains dates, but is it really defined as a Date/Time field in the design of the underlying table?)
    3. Instead of IIf and IsNull, you should also be able to use the Nz function:

    =Nz([DepositDate],"No Deposit Date")

    Nz returns the first argument unless that is Null, then it returns the second argument.

  3. #3
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Null Values (A2K SP3)

    DepositDate was a Time/Date field

    Many thanks as usual.

    Tom

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

    Re: Null Values (A2K SP3)

    In that case I don't really understand why the IIf expression won't work. Have you tried using the expression with Nz I posted?

  5. #5
    4 Star Lounger
    Join Date
    May 2002
    Location
    Roanoke, Virginia, USA
    Posts
    493
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Null Values (A2K SP3)

    Sorry that there was some confusion with my prior answer. I was thanking you for the Nz solution which worked fine.

    Tom

Posting Permissions

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