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

Text in Query/Numbers in Report

P: n/a
Tom
Hi all:

I've run into a problem that is confounding me. Hope you can help.

I have the following query (having removed alot of stuff for clarity:

SELECT tblComponent.TagNumber, First(nz(tblcomponent.CompStream,"N/A"))
AS CompStream, ...
FROM ...
WHERE ...
GROUP BY ...;

Bottom line is that they query returns records grouped by TagNumber
based on certain criteria. CompStream may be a null field, so I wrap
it in the nz function to return a "N/A" if null. If CompStream is
not null it contains text values.

A report is based on the query with a Group on CompStream. When the
report opens the value listed in the field CompStream is not the same
as what is listed in the query. (The query returns a text value
consistent with the underlying table value. The report displays a
numeric value.)

If I remove the NZ function, the query and the report display the same
(correct) value.

Database is originally A2K and I just recently started using a computer
with A2K2.

Any ideas?

Thanks

Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Perhaps you have a lookup field in your table?

"Tom" <rt*****@swbell.net> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com...
Hi all:

I've run into a problem that is confounding me. Hope you can help.

I have the following query (having removed alot of stuff for clarity:

SELECT tblComponent.TagNumber, First(nz(tblcomponent.CompStream,"N/A"))
AS CompStream, ...
FROM ...
WHERE ...
GROUP BY ...;

Bottom line is that they query returns records grouped by TagNumber
based on certain criteria. CompStream may be a null field, so I wrap
it in the nz function to return a "N/A" if null. If CompStream is
not null it contains text values.

A report is based on the query with a Group on CompStream. When the
report opens the value listed in the field CompStream is not the same
as what is listed in the query. (The query returns a text value
consistent with the underlying table value. The report displays a
numeric value.)

If I remove the NZ function, the query and the report display the same
(correct) value.

Database is originally A2K and I just recently started using a computer
with A2K2.

Any ideas?

Thanks

Nov 13 '05 #2

P: n/a
Tom
No - and even if I did, would not the query and the report return the
same value?

Tom

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.