Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Dec 2000
    Location
    Massachusetts, USA
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    #NAME? error on Sum

    I'm getting a #NAME? error when attempting to Sum a text box using Access 97.
    I have a form (FormA) and a subform (FormB). FormB shows the many side of FormA where FormA is the Customer information and FormB is a one line per transaction for the Customer Invoice Detail. FormB has a text box Named (txt_Interest) which calls a function to calculate interest from the Control Source. This all works fine. My problem is that in either the subform Form Footer or the main form Form Footer I am trying to show a total of this interest but always get the #NAME? error.

    I have tried the following all with the same result:

    1. In the subform Form Footer: Sum(txt_Interest)
    2. Creating another text box on the subform (and making it invisible) where the Control Source = txt_Interest and then tried to sum this text box by it's Name in the Form Footer
    3. In the main form's Form Footer I created a text box and tried: Sum(Forms![FormA]![FormB].Form![txt_Interest])

    I'm not sure if I am entering something wrong in my variations of the Sum or if the problem is because the text box holds the results of a Function.

    Any suggestions of how to handle this problem are greatly appreciated.

  2. #2
    2 Star Lounger
    Join Date
    Dec 2000
    Posts
    120
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: #NAME? error on Sum

    You cannot reference an unbound text box in the sum function. You must use whatever formula you used in txt_Interest.

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Brisbane, Queensland, Australia
    Posts
    352
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: #NAME? error on Sum

    It is worth checking that the relevant text boxes and their sources all have different names. If you have a field 'Fred' in a table and use this of a source of a text box 'Fred' you cannot sum it. If the source is 'fldFred' and the control is txtFred the problem does not arise.
    David Grugeon
    Brisbane Australia

Posting Permissions

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