Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    NZ function (Access 97)

    Having trouble using NZ function. I have a field in a report which when null produces a blank value. I want to be able to use a O instead of the blank space. I was advised to use the NZ function. I've tried using this with no success. Can anyone provide some examples or a solution for this? The field on the report is called latedate. Should NZ be used at the query or report level? Thanks for the help....

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: NZ function (Access 97)

    How are you trying to use the NZ function?
    It's syntax is:
    NZ(Field,SubstitutedValue)
    where SubstitutedValue may be an Alphanumeric or Numeric value.
    You can use the NZ function at either query or report level.
    Pat <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: NZ function (Access 97)

    What kind of field is it? If latedate is a datefield, you can't use a character in the Nz function. Whatever you generate as the default value from an Nz function still have to be compatible with the datatype of the field. Otherwise, you'll get an error in the query or report.
    Charlotte

  4. #4
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Minneapolis, Minnesota, USA
    Posts
    262
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: NZ function (Access 97)

    In addition to the previous posts, make sure you've renamed the control on the form for latedate to be something else, say txtLateDate, or even if you've constructed the Nz() function properly and your substitute value is of the appropriate data type, you'll have set up a circular reference and you'll see #Name or #Error (I forget which) displayed. Good luck!
    <font face="Comic Sans MS"><font color=blue>~Shane</font color=blue></font face=comic>

Posting Permissions

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