Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2005
    Location
    Brooklyn, ny
    Posts
    69

    Unanswered: replace null field data to a 0

    Hello, is there a function in access to replace null field data to a 0 when a query is executing?

    thank you very much

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Hi

    Check out NZ in Help

    HTH
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Jan 2006
    Posts
    14
    In a query, you can make an expression:

    New Field Name: iif([field name] is null, 0, [field name])

  4. #4
    Join Date
    Sep 2005
    Location
    Brooklyn, ny
    Posts
    69
    Thank you, BUT it is convert data to a text type and I need to preserve the Currency type.
    How to fix it to the currency format?

    nz([2006ByMonth].[Jan'06 Dollars] ,0) AS [Jan'06 Dollars]

    Thank you

  5. #5
    Join Date
    Sep 2005
    Location
    Brooklyn, ny
    Posts
    69
    I replace it to the IIF
    and it is working just fine, datatype is as a Currency.
    Thank you all very much

    iif([field name] is null, 0, [field name])

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Similarly:
    Code:
     CCur(NZ([field name], 0))
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

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