Square Characters to be replaced by line breaks

  • Thread starter Thread starter kingstaggo
  • Start date Start date
K

kingstaggo

Guest
Hello all,
I come to you for help in a moment of UTTER frustration.
The scenario is as follows:
I have a report that is displaying what looks carriage return characters (little upright rectangles) that I believe are ASCII chr(9)/(10) or (13) characters and need to remove them and force a new line in my report.
I have tried the following to no avail: http://support.microsoft.com/default.aspx?scid=kb;en-us;210433
ie the offending characters are still in the report/query.
And I have also tried replacing them to no avail.
I would be grateful if anyone can anyone please offer any advice on resolving this problem?
I have attached an example and the unwanted square characters can be viewed by running report 1.
Should anyone require any further information, please let me know.

Thanks

Dean
 

Attachments

I don't understand. These characters are in the data held in your table. They have not been added by the database.

You need to explain what you are wanting.
 
Explanation

Hi Neil,
Thanks for getting back to me.
I have to admit that I don't particularly know how the square characters got into the table in the first place (possibly via an import) as I am kind of looking at this issue for someone else (who is now unavailable for a couple of weeks).
The ideal end result is to not have the square characters display on the report and to have a carriage return to force a new line wherever a square character exists.
I have tried using the replace function to replace the characters and I tried the solution tendered by Microsoft (in the original post) all to no avail.
I have attached a text version of how I would ideally like the report to display the records (if possible), any feedback would be greatly appreciated.
I hope this helps and thanks again.

Dean
 

Attachments

The easiest way to do this will be to reorganise the way you hold the data and compile the report.

Access reports handles multiple records on separate lines just great. It makes more sense to use this facility than to programmatically change your squares to line breaks etc. So you need to hold these lines as separate records in your text definition table with the same ID and then group on this ID when you generate the report.
 
Has this problem been resolved? I also tried the Microsoft solution but couldn't get it to work until I realized that my text had both a carriage return and a linefeed. So I modified the code to look for vbCrLf and then modified the RemoveTabs function to replace the "+1" with "+2" when calculating the rear variable.

Hope this saves someone the hours I spent working this out.
 
Pat,

Don't tell me there is a "RemoveTabs" function!?

For example, I have imported megs of data with "embedded
Tabs". Stuff from Word Perfect (s/w test procedures).

I put the form/report in Courier and replaced the Tabs with
the appropriate number of spaces.

I even used "GrowBox" to make them look OK.

Was there an easier way?

Wayne

p.s. Sorry about the 2003 and Word topics, I don't know anything
about them. I'd have been glad to help.
 
It is a user defined function written by a Microsoft tech while helping a customer. Follow the link to the article in the first post of the thread.
 
dear dean,

i think the problem can be best solved by writing a module where you find the 'square box' in the data and replace is by 'vbCrLf' which is VBA equivalent of line break. I used it in one of my projects so it works efficiently. Convert the data by running the module and store the (converted) data in a new field.

Angshu
India
 

Users who are viewing this thread

Back
Top Bottom