469,301 Members | 2,282 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,301 developers. It's quick & easy.

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!
Jan 19 '12 #1
12 7798
32,173 Expert Mod 16PB
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?
Jan 19 '12 #2
Here's the Select statement from the query:

[Organization_desc].[Organization] & ", " & [Organization_desc].[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.
Jan 19 '12 #3
32,173 Expert Mod 16PB
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.
Jan 19 '12 #4
393 256MB
For the control that won't print, check to see if it's named "Org_State". If so, change it.
Jan 19 '12 #5

It's not - it's called "Organization". I changed the name, anyway, just for the fun of it - and that didn't help at all.
Jan 20 '12 #6
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...
Jan 20 '12 #7
32,173 Expert Mod 16PB
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 :-(
Jan 20 '12 #8
Correct - no code anywhere in the Report.
Jan 20 '12 #9
32,173 Expert Mod 16PB
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.
Jan 20 '12 #10
393 256MB
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.
Jan 27 '12 #11
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 "Organization" field, and it works beautifully now!

Thanks again.
Jan 27 '12 #12
32,173 Expert Mod 16PB
Good for you Katie.

It's funny how things sometimes get found - even when doing things for other reasons :-)
Jan 28 '12 #13

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Tom Louchbaum | last post: by
3 posts views Thread by shayvillere | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.