Access Access anti-trim??

Feb 26, 2015
Reaction score
I have a local table where I am needing to change the primary key so it formatted the same way that a field is in a separate linked table.

In the linked table, the field is formatted to always be 10 characters. There is always a space at the end which is included in those 10 characters. In positions without a character, there is a space.

800= “(space)(space)(space)(space)(space)(space)800(space)”
10155= “(space)(space)(space)(space)10155(space)”

In my local table, the field is trimmed.
800= “800”
10155= “10155”

This expression gives me the correct number of characters with a space at the end, but I need the zeros to be spaces instead of zeros.

Expression: Format([field],"000000000" & " ")

These fields are text fields and must stay that way. Any ideas?? Thank you!


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