Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    NZ function (Access 2000)

    Will you help me build the proper code including cases when there is a Null value.I have the following code :
    If Me![Stueck] <> Nz(Me!In - Me!Out, 0) Then
    Me!Stueck.ForeColor = 255

    However i do not want to show this color when there is no value in the Out text box.
    For example
    in out stueck
    15 15
    i cannot get this solution.The above code gives me a red color when i have In = 15, stueck = 15 and nothng in out.

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

    Re: NZ function (Access 2000)

    Try

    If Me![Stueck] <> Nz(Me!In, 0) - Nz(Me!Out, 0) Then

    or if Stueck can be null (blank) too:

    If Nz(Me![Stueck], 0) <> Nz(Me!In,0) - Nz(Me!Out, 0) Then

  3. #3
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: NZ function (Access 2000)

    Yes ! That was the solution !

Posting Permissions

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