Okay, you have a calculated field in your query.
Could you post this field please?
Presumably it says something like:
MyField: [Field1] & [Something] & [Another]
In report design view, what exactly do you have in these properties of
the
problem text box:
Control Source (Data tab)
Format (Format tab)
Name (Other tab)
ReadingOrder and NumericalShapes exist only in Access 2002 and later. If
you
are using these versions you should have:
ReadingOrder: Context.
NumericalShapes: System
Unicode is present in Access 2000 and later.
Do you have multiple languages installed?
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
Thanks for the post reply. I tried everything I could from your post.
Some
additional information in response to your questions,
1) I am only using ARIAL and TIMES NEW ROMAN fonts throughout all my
reports.
2) I do not understand what you are referring to when you say
READINGORDER
and NUMERICALSHAPES property settings. These do not exist as
properties
for
text boxes, at least not that I can see.
3) There sure might be confusion over 8-bit ASCII and unicode, I sure
am.
But I do not know how to check or fix this.
4) All the text in the calculated fields in my query are left aligned.
In
fact, all look to be text, as they should be.
5) What is the explicit function to ensure the calculated fileds
return a
test string? Is it CSTR?
I tried creating a new report with only the calculated field printed.
I
get
the same result, it prints to the report as a series of numbers and
letters
inside the { and } brackets.
When I simply open the query directly I see the field values exactly
as I
expect them. I am simply combining three text strings into another
text
string. The strings look like this "9573", "SP" and "REG" being
combined
into "9573SPREG".
:
This could be a display issue, a data type issue, or a corruption
issue.
Display
=====
What font is used in the report? Test with the basic fonts like Arial
or
Times New Roman.
Check the properties of the text box, e.g. ReadingOrder and
NumericalShapes.
Make sure there is nothing in the Format property of the text box
that
would
force it to interpret the data differently than expected.
Any chance of confusion about whether this is 8-bit ASCII data or
Unicode
data?
Data type
=======
You say the calculation looks fine in the query.
Does it left-align (like text), or right-align (like numbers)?
Make sure there is nothing in the Format property of the text box in
the
query.
Try explicitly typecasting the result of the calcuation. For example,
if
you
have:
[Qty] * [PriceEach]
try:
CDbl(Nz([Qty] * [PriceEach], 0))
More info on this in:
Calculated fields misinterpreted
at:
http://allenbrowne.com/ser-45.html
Corruption
=======
If neither of the above proves fruitful, it is possible that:
a) the report is corrupt,
b) the data is corrupt,
c) Access is confused about what refers to what,
d) the code is corrupt.
Start by ensuring the Name AutoCorrect boxes are unchecked under:
Tools | Options | General
Then compact/repair the database. That could take care of (b) and
(c).
(d) would apply only if the query or report calls a VBA function. If
so,
try
a decompile, followed by a compact.
To demonstrate (a), create another report based on this query, with
just
the
one field if you like. If this one works, you can develop it further
and
discard the bad one. (If the report is complex, you might be able to
rescue
it with the undocumented SaveAsText/LoadFromText.)
I have an Access 2000 database application that I am developing.
The
problem is that in one of my queries I am calculating a string as a
combination of other strings. The calculation works fine and the
values
are as expected when I open the query. However, when I view the
same
query
data in a report the calculated values appear as garbage. The
values
look
like registry key values inside the {} brackets. Any idea as to
what
might
cause this? Thanks