Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table cell auto trimming 1

Status
Not open for further replies.

acent

Technical User
Feb 17, 2006
247
US
Hi All,

This is probably something stupidly simple, but I can't figure it out.

I have a table which stores information on how to process strings. One of the fields is a text field that I want to store a string ") " - the space at the end necessary. However, when I enter that in the table, Access in all its wisdom changes it to ")" - no space.

How do I get Access to stop trimming my fields? There is a reason for this space... I wouldn't enter it if it wasn't needed.

Thanks in advnace for the help.

"If it's stupid but works, it isn't stupid."
-Murphy's Military Laws
 
see remou's solution in the following thread

Remou said:
I have not tested this properly, but you may find a space-like character suits:


Code:
Private Sub txtText_KeyPress(KeyAscii As Integer)
    If KeyAscii = 32 Then KeyAscii = 160
End Sub

160 is not trimmed by Access and you can use replace in your query to set Chr(160) to Chr(32).
 
That's what I'm talking about.....

THANK YOU! And THANK YOU, Remou!

"If it's stupid but works, it isn't stupid."
-Murphy's Military Laws
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top