Preserve trailing space entered into text box

G

Guest

The access userform is truncating any trailing space entered into a text box.
Is there a text box property that I can set to preserve the trailing space?
 
A

Al Camp

Hmmm... why would you need to do that? If you need to concatenate that
field with another, just insert the space at that time.
= Field1 & " " & Field2
If you must have the space after the text, try holding the AltKey and
type 0160. In most fonts, this is a blank character, and Access treats it
as a legitimate character, and won't truncate it.
I use this method on my field labels to keep the caption from crowding
up against the left side of a text control...
"City: "
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
G

Guest

Thanks. Good suggestion.

I am using this field in a word app as the before part of a list level
number format and I actually want the space there before the number
formatting like "Part %1:" where the "Part " is the before text (including
the space), the "%1" is the list level number and the ":" is the after text.
 
G

Guest

I can't get this to work. Something I'm doing more then likely. I am
depressing the Alt key and then I type the keys 0160 and nothing. What am I
doing wrong here?
 
A

Al Camp

Depress and "hold" the Alt key while you enter 0160.

What kind of a field or control are you entering the data into?
Text...Label? It should work for either...
Make sure that the font you are using has a blank character for Alt 0160.
Arial does... try that.
Also, try some other Alts like 0155 or 0174 etc.. etc... to see if you get
anything at all.

Try creating an unbound text control on your form, with...
= "ABC" & Chr(0160) & "DEF"

Use the windows mini-application CharMap to check your ascii code
assignments for your font.

It's an old DOS trick, and it's always worked for me in any version of
Access.
 
B

BruceM

Try using the numbers on the numberic keypad, not the ones above the letters
on the keyboard.
 

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