Name? error in Report - print view only (access 2010)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Katie Howard
    New Member
    • Dec 2011
    • 23

    Name? error in Report - print view only (access 2010)

    Hi - I have a report that's based off a query. The first field in my report is a field from the query that was a combination of 2 different fields (company & state) - looks great in the query, no problems. I run my report and it's perfect, pulls in the field just as expected - until I either export to PDF or do a Print Preview, at which point it displays "Name?" in that field. My report has this field listed for each company, and the rest of the report displays perfectly in either view; it's just the very first record that gets that error.

    Any ideas? I'm sure I'm doing something wrong somewhere, but haven't been able to identify what - despite Googling it and searching everywhere I can think.

    Thanks for your help!
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32634

    #2
    Please provide the relevant part of the SELECT line (from the SQL of your query), as well as describe how the control on your report is defined. I assume it's a TextBox. Does any code run in your report's Open event procedure?

    Comment

    • Katie Howard
      New Member
      • Dec 2011
      • 23

      #3
      Here's the Select statement from the query:

      [Organization_de sc].[Organization] & ", " & [Organization_de sc].[State] AS Org_State

      The form's record source is this query, and the Control Source for this field is Org_State (which I can pick from a drop-down menu).
      And yes, it's a Text Box.

      I should also mention that I have a secondary field in my query/report that's a combination of fields (full name which combines first and last name), and there's no trouble at all with that field.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32634

        #4
        And no code in the report's module anywhere?

        I must admit I see nothing untoward with what you've shown so far. It would make that field non-updatable, certainly, but why it would fail to display in any circumstances you've described I don't know - unless the code is interfering.

        Comment

        • dsatino
          Contributor
          • May 2010
          • 393

          #5
          For the control that won't print, check to see if it's named "Org_State" . If so, change it.

          Comment

          • Katie Howard
            New Member
            • Dec 2011
            • 23

            #6
            @dsatino.

            It's not - it's called "Organizati on". I changed the name, anyway, just for the fun of it - and that didn't help at all.
            Last edited by NeoPa; Jan 20 '12, 02:47 PM. Reason: Removed unnecessary quote

            Comment

            • Katie Howard
              New Member
              • Dec 2011
              • 23

              #7
              I just tried changing the field that gets pulled in, and instead of having it be a combined field (organization and state), I did a single field (organization) and am getting the exact same "Name?" error in print preview only, for the first record in the report only. I'm completely stumped...

              Comment

              • NeoPa
                Recognized Expert Moderator MVP
                • Oct 2006
                • 32634

                #8
                Originally posted by NeoPa
                NeoPa:
                And no code in the report's module anywhere?
                Were you able to confirm this Katie?

                I must admit - my ideas are running out on this one. I was hopeful for Dsatino's suggestion, but even that drew a blank it seems :-(

                Comment

                • Katie Howard
                  New Member
                  • Dec 2011
                  • 23

                  #9
                  Correct - no code anywhere in the Report.

                  Comment

                  • NeoPa
                    Recognized Expert Moderator MVP
                    • Oct 2006
                    • 32634

                    #10
                    In that case I am stumped. Sorry. In your position I'd try to recreate the report from scratch in case of some type of corruption. Normally, when something is confusing it just means we don't understand well enough, but there's also a slim possibility that the db is corrupted somewhere. Don't be surprised if it's not, but if it were me I'd check that at least until I saw the same problem occurring.

                    I'm afraid that's all I have for you Katie, and I know it's little enough. Sorry.

                    Comment

                    • dsatino
                      Contributor
                      • May 2010
                      • 393

                      #11
                      Ok, this is a really long shot, but it is based on a vaguely similar experience where I wasn't getting my formatting on the very first record only.

                      if your control that has the error on the very first record is butted up against the top of the detail section move it down some. If your report/page header (I can't remember which is used) is totally collapsed, open it up some.

                      Comment

                      • Katie Howard
                        New Member
                        • Dec 2011
                        • 23

                        #12
                        I FINALLY figured it out (as I was recreating the report from scratch). Thanks to you both for your input! Here was my problem:

                        I had initially pulled in a different field into the report and had conditional formatting tied to that field (which I'd since forgotten about); and when I decided to use the Org_State field, I merely changed the source for that field instead of pulling it into the report by "adding existing fields"; so the formatting was looking at a field that didn’t exist. I merely had to change my conditional formatting to apply to the "Org_State" field instead of the "Organizati on" field, and it works beautifully now!

                        Thanks again.

                        Comment

                        • NeoPa
                          Recognized Expert Moderator MVP
                          • Oct 2006
                          • 32634

                          #13
                          Good for you Katie.

                          It's funny how things sometimes get found - even when doing things for other reasons :-)

                          Comment

                          Working...