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

    nz function (Access 2000)

    Sometimes i have problems with blank fields, they even have minus values, and i try to correct them by putting nz function.Could you please check up please to tell me is the nz function correct and it is enough to avoid problems with adding 0 and minus fields?

    Public Function dummy()
    StrSQL = " UPDATE (products1 INNER JOIN products ON products1.Productid = products.Productid)" & _
    " INNER JOIN [Order Details1] ON products1.Productid = [Order Details1].productid SET products1.items1" & _
    " nz([order details1].[quantity]1,0)+ nz([products1].[items1]1,0)"

    End Function

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Thanked 31 Times in 31 Posts

    Re: nz function (Access 2000)

    You don't have = between the field that you want to update and the value that you want to assign.
    You have 1 after a closing square bracket ] twice - that can't be correct.

    I would recommend that you create the query in design view in Access and test it. When it works correctly, select View | SQL. You will see the SQL that you need.

Posting Permissions

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