Nonbreaking Hyphens

A

Al Campagna

Grace,
Is this a Microsoft Access question? Not sure what you mean by
"non-breaking". Sounds like a Word thing...

Anyhoo... given some string, a hyphen can be inserted into that string.
As far as I know it would just be considered like any other character, and
would have no other effect on the string.
A simple example
Given a field named MyText and a value of "ABCDEF"...

= Left(MyText,3) & "-" & Mid(MyText,4)

Would yield "ABC-DEF"
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
G

Grace

This is actually a Access 2007 question. I have a field which is a text
field within a table. This text field is used in a Report. Sometimes there
are hyphenated words within this field (i.e. on-site). When the report is
printed, it looks weird to have on- on one line and site on the line below it
depending where these words are in the memo field.
 
A

Al Campagna

Grace,
OK... I haven't spent much time with 2007, so they may have changed the
text handling.
It just seems as though all the older versions of Access just used the
nearest "space"... as to where to "break".
If "on-site" stays together everywhere but close to the right margin,
you may have to live with the occasional odd break.

Some one may pipe in on this thread, but if not, please feel free to
start a new post.
Sorry to not be of more help.
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."
 
A

Allen Browne

In a Rich Text Box in Access 2007, you can use HTML characters such as
  for a non-breaking space. But A2007 does not seem to treat it
correctly. It displays correctly as a space, but does not respect the
non-breaking part (i.e. the words do break at that point at the end of a
line.)

Similarly, – does not give a non-breaking hyphen. Not sure what to
suggest.
 
Joined
May 10, 2012
Messages
1
Reaction score
0
This may seem an old post, but I was looking into this recently and have a solution that might work for others.

Although the usual &nbsp do not seem to work it is possible to achieve the same result by changing the color of the text of a standard letter and using that to join the words.

This works for a space; ="non-breaking space<font color=white>o</font>test"

May be this approach could be adapted for non-breaking hyphens by using a different or custom font

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top