trim command

M

Mike Fellows

I have a text field that i want to cut the last 2 chars at the end of the
string off

the string is of variable length, it is a postcode and is of variable length
i.e.

AA9 9AA
AA99 9AA
A99 9AA
A9 9AA

what i want to be left with from my string is

AA9 9
AA99 9
A99 9
A9 9

i have tried using all combinations of left/right and trim but i cant
successfuly just remove the last 2 charachters

Any help would be greatly appreciated


Mike Fellows
 
R

Rick Brandt

Mike Fellows said:
I have a text field that i want to cut the last 2 chars at the end of the
string off

the string is of variable length, it is a postcode and is of variable length
i.e.

AA9 9AA
AA99 9AA
A99 9AA
A9 9AA

what i want to be left with from my string is

AA9 9
AA99 9
A99 9
A9 9

i have tried using all combinations of left/right and trim but i cant
successfuly just remove the last 2 charachters

Left([YourFieldName], Len([YourFieldName])-2)
 
M

Mike Fellows

Thanks Rick That was spot on


Rick Brandt said:
Mike Fellows said:
I have a text field that i want to cut the last 2 chars at the end of the
string off

the string is of variable length, it is a postcode and is of variable length
i.e.

AA9 9AA
AA99 9AA
A99 9AA
A9 9AA

what i want to be left with from my string is

AA9 9
AA99 9
A99 9
A9 9

i have tried using all combinations of left/right and trim but i cant
successfuly just remove the last 2 charachters

Left([YourFieldName], Len([YourFieldName])-2)
 

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