Solved

Access 2002 Report - Break a text line on a space

Posted on 2008-10-23
6
336 Views
Last Modified: 2012-06-27
I have a report which has to display a number of long lines of text.  Inevitably this text is too long for a single line space.  So the text needs to be broken at a logical BLANK space and then continued on the next line.  An example of how Access handles it is shown below.  Access breaks the line in the middle of a word and does not print the rest of the word before continuing the text on the next line.

Is there a way to have Access break this text at a blank automatically - or do I have to write a VBA routine to format the text properly?
This long line of text should be broken at a blank space before continu

to the next line.  Breaking in the middle of a word is not acceptable.

Open in new window

0
Comment
Question by:ljcor
  • 3
  • 2
6 Comments
 
LVL 57

Expert Comment

by:Jim Dettman (Microsoft MVP/ EE MVE)
Comment Utility
<<Is there a way to have Access break this text at a blank automatically - or do I have to write a VBA routine to format the text properly?>>

  None that I'm aware of.  You'd have to write a routine to reformat the text putting in a vbCRLF at the apporpriate spots based on the width of the control.

  Font type and size would need to be taken into account.

JimD.
0
 
LVL 77

Accepted Solution

by:
peter57r earned 500 total points
Comment Utility
Access does not work like that for me.  It always breaks on word boundaries.
Which version of Access is this?
How did you create the report?

0
 

Author Comment

by:ljcor
Comment Utility
peter57r

I am using Access 2002 which comes in Office 2003 (go figure.)

I created the report by:  Clicked on Reports, clicked on New, Clicked on AutoReport Tabular.  Then I selected a Table whick has a few fields including one with the long lines of text.

I just did this again for a new report and it worked just fine, breaking on a word boundry.  I thought it did that the first time I tried this awhile back, too.  However, when I modified the length of the line in Design view it started chopping off the word.  I don't know why.  Perhaps you have an idea.  Either way I will accept your solution since that is just how I want it to work.

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Closing Comment

by:ljcor
Comment Utility
Thanks, Peter.
0
 
LVL 77

Expert Comment

by:peter57r
Comment Utility
I have tried messing around with the size of the textbox but can't create a problem except when it is so narrow that the whole word does not fit on one line. Otherwise it is consistently breaking on a word boundary.
Sorry I can't throw any light on the problem.
0
 

Author Comment

by:ljcor
Comment Utility
Good enough.   I will just do it all over again - particularly since it is no problem.  Thanks again.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now