• NZ function (Access 97)

    Author
    Topic
    #380787

    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….

    Viewing 2 reply threads
    Author
    Replies
    • #639038

      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 cheers

    • #639209

      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.

    • #639386

      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!

    Viewing 2 reply threads
    Reply To: NZ function (Access 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: