Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    tharless is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    14

    #NAME? Error keeps coming back

    Hello All,
    I have a report that has 2 text boxes containing numbers based from a table, a third text with an if funtion, =IIF([text1]=0,"NA",[text1]/[text2]), this box is meant to be a percent of box 1 and 2. When I run the report I get the #NAME? error, I go into design view and all the control sources and names are correctly spelled, non-circular, and non-conflicting. I make any change at all to either the if formula or the name of the text box, save and problem solved, so i think. I then close the database, re-open it and there it is again, #NAME?, starting to drive me crazy, everythime i fix it, it comes back as soon as I close and re-open. ANY thoughts?



    Thanks in advance

  2. #2
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,067
    First why are you checking the numerator for 0 instead of the denominator?

    0/1 = 0
    1/0 = error

  3. #3
    tharless is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    14
    Thanks for the response, I have it set that way because if the person in the report has no data in text one I do not want any result to appear at all, in other words I dont want it to show 0% as that would look negatively on the person. The formula works as it should, like I said whenever I change the name or re-enter the formula, the problem is after I close the db it errors again.

  4. #4
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,067
    Ok, what that's telling me is that the first time you open the report something is not set yet After you've opened in Design and made retyped it's ok.

    Try this use the actual fieldnames instead of the textboxes.

    =IIF([fieldname1]=0,"N/A",fieldname1/fieldname2)

  5. #5
    tharless is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    14
    Nope, it fixed it until I closed it and re-opened it, then back to the #NAME?

  6. #6
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,067
    Can you remove sensitive data and post the DB here?

  7. #7
    tharless is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    14
    Sorry, I work in the claims department of an insurance company and even with sensitive data removed I could get fired for posting it.

  8. #8
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,067
    Understand I work in Healthcare.

  9. #9
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,067
    Maybe you could use the documentation feature of access and document the report. Post the document. It'll show all of the fields and properties of the report but none of the data.

  10. #10
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,067
    If in doubt clear it with your boss

  11. #11
    tharless is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    14
    That I could do, but I'll warn you it 47 pages

  12. #12
    tharless is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    14
    Sorry I should have mentioned the box giving me the trouble with the formula in it is named MonthSDC%, the boxes used in the formula are named txt1, with control source of [MonthCLMTS], and txt2 with control source [MonthSDC]

  13. #13
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,067
    Ok, I don't see any issues. Try something for me just out of curiosity. Close the DB and open it run the report get the error go to design mode. Change nothing save the report and re-run it let me know if you get the error the second time.

  14. #14
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,067
    Ok did a search on the PDF file for txt1, txt2, MonthSDC, MonthCLMTS and found none of them.

  15. #15
    tharless is offline Novice
    Windows 7 Access 2007
    Join Date
    Sep 2010
    Posts
    14
    I will have get to back at it tommorow, I'm in the eastern time zone so its after 5 and time to go, thanks again for all your help.
    The text boxes are on a sub-report that may be why they didn't show up.
    I will run the documentation report on the sub report tomorrow and post it.
    Thanks again, have a nice rest of your day

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. I'm back!
    By evander in forum General Chat
    Replies: 3
    Last Post: 02-27-2013, 08:29 PM
  2. Replies: 2
    Last Post: 12-08-2011, 02:27 PM
  3. Replies: 2
    Last Post: 09-01-2010, 09:51 PM
  4. Replies: 2
    Last Post: 04-27-2010, 01:25 PM
  5. Replies: 1
    Last Post: 11-08-2008, 10:40 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums