Link to home
Start Free TrialLog in
Avatar of smurray20
smurray20

asked on

Ms Access report - problem with carriage / line returns

Hi,
In my Ms Access 2007 report I am having problems with the formatting.  Instead of a new line I get a strange character, like a box with the vertical lines missing.
The data is inputed via the internet to a SQL Server database and then exported and printed from Access.
I have tried using the replace function and Chr(13)&Chr(10) but this isn't working.

Any ideas?
Suzanne
Avatar of smurray20
smurray20

ASKER

I forgot to say that this only happens sometimes!  But its a torture having to trawl through the reports and fix them individually.

Thanks
Suzanne
without knowing which char it is it's hard to say but it sounds like your on the right track.
any chance of saving the dump to a text file and putting that up here so we can find out what char it is?
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Where are you using Replace and/or Chr(13) & Chr(10) ?

mx
Hello smurray20,

I would try the following:

Replace(Replace(Replace(SomeColumn, Chr(10), ""), Chr(13), ""), Chr(160), "")

Those are my guesses for the most likely "strange" characters that may have snuck in there.  You may also
want to test for the tab character, whose ANSI value presently escapes me...

Regards,

Patrick
In the report
I can't upload any data, sorry.

But when I look at the table there is a question mark in a box in the field that is causing problems - does that help?
The question is ... what is the question mark ?

mx
Patrick - that has removed the strange characters but it has also removed any paragraphs too!
How do I get them to display??
Suzanne,

Another thing to consider: check whether the column from SQL Server is [var]char or n[var]char.  If the latter,
it may be some really exotic character :)

Patrick
ASKER CERTIFIED SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
smurray20,

Not meanig to muddy the waters here...

But you never actually posted any of the Codes/Strings you are trying to use.
You keep saying what is wrong, but we never actually see what you are trying.
You don't have to post your entire database or any confidential data, just post a sample of what you are trying.

Without the actuall code/string (and any vaiable Values) we are all just guessing.

JeffCoachman