By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,574 Members | 3,021 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,574 IT Pros & Developers. It's quick & easy.

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

P: 23
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
Share this Question
Share on Google+
12 Replies


NeoPa
Expert Mod 15k+
P: 31,494
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

P: 23
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

NeoPa
Expert Mod 15k+
P: 31,494
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

dsatino
100+
P: 393
For the control that won't print, check to see if it's named "Org_State". If so, change it.
Jan 19 '12 #5

P: 23
@dsatino.

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

P: 23
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

NeoPa
Expert Mod 15k+
P: 31,494
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 :-(
Jan 20 '12 #8

P: 23
Correct - no code anywhere in the Report.
Jan 20 '12 #9

NeoPa
Expert Mod 15k+
P: 31,494
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

dsatino
100+
P: 393
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

P: 23
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

NeoPa
Expert Mod 15k+
P: 31,494
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.