How do I put a non-breaking space in an Access field

  • Thread starter Thread starter JDA
  • Start date Start date
J

JDA

How can I enter a non-breaking space between the two parts of a post code so
the postcode doesn't split when merging info to another document
 
Actually the space will potentially break or wrap. I believe character sets
have a no-break space character that can be entered by typing Alt+0160 or
something similar. You might also be able to use Chr(160).

--
Duane Hookom
Microsoft Access MVP


Steve said:
Use a query of your table containing the two parts of post code when merging
info to another document. Instead of using the two parts of post code create
a calculated field:
PostCodeToUse:[PostCode1] & " " & [PostCode2]

Steve
(e-mail address removed)



JDA said:
How can I enter a non-breaking space between the two parts of a post code
so
the postcode doesn't split when merging info to another document
 
Try Chr(160)
I pasted one in from word and got ASCII 160 but their table has 160 as
something else.
It might work.
 
To me this conversation seems a little confused, not that I have the answer.

BTW, don't forget that softwares the word wrap, when they need to, will even
break things that aren't spaces.

I think that what you are really asking for some type of a space character
which will command the "word wrapping" software to doe wither or both of
these:

- Not treat it as a space
- Try really hard not to break at that point, to the bpoint of breaking a
non-space if necessary.
- Never break it at that point

This seems more of a question of what, if any, character will conttrol the
word wrapping software according to the above..
 
Both Karl and I replied with what I believe is the correct answer. Assuming
you have a phone number like "(111) 555-1234" in a memo or other longer text
field and you don't want the wrap to occur at the space betwee the (111) and
555. You can hold down the Alt key and enter 0160 which will look like a
space but it won't wrap.

This would also work to keep "April 2" or "Mr. Dewey" from breaking at the
space.

I expect you could use Chr(160) or similar in code.
 
Back
Top