Re: String Used in Report Displays as Garbage
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Sat, 3 Jun 2006 00:41:59 +0800
Thanks, Ken. It's hard to see how Access could get this one wrong.
Is there anything else in the database that has the name ProductCode?
I presume you have already unchecked the Name AutoCorrect boxes under:
Tools | Options | General
Try changing the Name of the text box to the same as the field (i.e. drop
the txt prefix.) Then compact the database.
If that doesn't work, I would like to see this wonder. If it is small enough
to zip, email it to the address in the sig below, and I will try to look at
it tomorrow.
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Ken" <Ken@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:54EF12D7-BEB3-4678-8F00-91B7563621C9@xxxxxxxxxxxxxxxx
The problem textbox has the following settings,
Control Source = ProductCode (the name of the calculated field in
my
Query)
Format = (no setting)
Name = txtProductCode
And, the ProductCode filed in the Query has the following,
ProductCode: [Products]![ProductBaseCode] & [Products]![CustCode] &
[Products]![SizeCode]
where [Products] is a TABLE with the basic text data.
Regarding multiple languages, no I do not have this installed. Only using
English.
One other piece of info which may be important is that I have developed
this
database on two PCs, one which has Access2000 and the other which has
Access2002 (ie. OfficeXP). On the 2002 machine I am saving the database
as
2000 format.
"Allen Browne" wrote:
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.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Ken" <Ken@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CC4B962D-B250-4516-83AA-6FD72EAEB5D1@xxxxxxxxxxxxxxxx
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".
"Allen Browne" wrote:
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.)
"Ken" <kefford@xxxxxxxx> wrote in message
news:447fa14f_2@xxxxxxxxxxxxxxxxxxxxx
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.
.
- Follow-Ups:
- Re: String Used in Report Displays as Garbage
- From: Allen Browne
- Re: String Used in Report Displays as Garbage
- References:
- String Used in Report Displays as Garbage
- From: Ken
- Re: String Used in Report Displays as Garbage
- From: Allen Browne
- Re: String Used in Report Displays as Garbage
- From: Ken
- Re: String Used in Report Displays as Garbage
- From: Allen Browne
- Re: String Used in Report Displays as Garbage
- From: Ken
- String Used in Report Displays as Garbage
- Prev by Date: Re: String Used in Report Displays as Garbage
- Next by Date: Re: Problem With String in Module
- Previous by thread: Re: String Used in Report Displays as Garbage
- Next by thread: Re: String Used in Report Displays as Garbage
- Index(es):
Relevant Pages
|
Loading