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!

Whitespace at end of string...

Status
Not open for further replies.

steverbs

Programmer
Jul 17, 2003
253
GB
Hi all.

I would like to store a single whitespace at the end of a value in Access so that when I fetch it using VB, I get something like 'value '. How can I achieve this?

Thank you in advance.

Stephen.
 
That would achieve the same end result, but I would like to be able to enter the entire string (including the trailing whitespace) in the database without Access trimming off the end white space chars.
 
I used this in an Append Query to Pad the field with trailing spaces (Field Length was 12)


FN: Format([Employees].[FirstName] & Space(12-Len([Employees].[FirstName])),"@@@@@@@@@@@@")

PaulF
 
Is there any way that you know of that would allow me to apply that to the physical field? I have tried entering "@@@" to the format for a field of length 3, but Access still trims the data as I enter it.
 
you can use it on the control where you capture the data... but for existing records, you can run an update query on the table (save a copy of it before you run the query).

PaulF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top