Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2010
    Location
    UK
    Posts
    160

    Unanswered: Help with Nz function in control source

    Hi there,

    I am trying to add fields from various subforms. The subfirm field is a calculated field. sum(extended_Price)

    I am using =Main_sub1.Form!Text1+Main_sub2.Form!Text2 in the control source for the grand total. I would like to take into account Null and zero entries but i am having trouble with the Nz function.

    thanks for your help
    marcus

  2. #2
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Well, all you need to do is wrap each expression that returns an integer in the NZ function.
    Code:
    =NZ(Main_sub1.Form!Text1, 0) + NZ(Main_sub2.Form!Text2, 0)
    Testimonial:
    pootle flump
    ur codings are working excelent.

  3. #3
    Join Date
    Sep 2010
    Location
    UK
    Posts
    160
    Hi pootle flump,


    I tried the code but it returned #Error

    I even tried =NZ([Main_sub1].[Form]![Text1],0) which works if Text1 = 0 but not if null. Very confused.

    P.S the s/w put the [] in the formula above for some reason?

Posting Permissions

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