Undesired #Name? Result

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Waqarahmed
    New Member
    • Jan 2022
    • 3

    Undesired #Name? Result

    I used your format and Rick's
    Code:
    =Sum(nz(VAL([Forms]![subCalendar]![Text1])))+(nz(VAL([Forms]!subCalendar]![Text25])))
    but I still keep getting #Name? in my textbox.
    Last edited by NeoPa; Jan 12 '22, 01:30 PM. Reason: Tidied up the code using the mandatory [CODE] tags.
  • isladogs
    Recognized Expert Moderator Contributor
    • Jul 2007
    • 483

    #2
    Hi & welcome to the forum

    Whilst I'm sure your questions is clear to you, I'm sorry to say its less than clear to me.
    For example, what does 'your format' mean? And who is Rick?

    You will need to provide additional context so one of us can answer properly

    The #Name error normally indicates that a field listed doesn't exist...or perhaps has been incorrectly spelt

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32662

      #3
      Hi & welcome to Bytes.com.

      I agree with Isladogs about there being no context defined in or for your question, and thus it means almost nothing to anyone who doesn't already know what you're talking about (Rick maybe?).

      Nevertheless, if we assume that you have two Controls on the same Form where you've got the (unnamed) TextBox with the formula - possibly in the Header Section, then you shouldn't need to specify the Form in your references. Perhaps you could try :
      Code:
      =Sum(Val(Nz([Text1],0)))+Sum(Val(Nz([Text25],0)))
      Certainly, the Nz() call would need to be within the Val() one. Otherwise, if any value is Null then it will be fed to the Val() function and produce #Name?. Giving this to Nz() will not fix it in any way of course.

      Let us know how you get on. Remember, we only know what you tell us so please tell us clearly.

      Comment

      Working...