retrieve last three characters of field

A

alecgreen

Hi

I have a field 'Part Number' which has records of various length, I
want to retrieve the last three characters of this field in my query.

Many Thanks

Alec
 
B

Bob Barrows

alecgreen said:
Hi

I have a field 'Part Number' which has records of various length, I
want to retrieve the last three characters of this field in my query.
Assuming that it's a text field, or a datatype that can be implicitly
converted to string (text), this will work:

select ..., Right([Part Number],3) As LastThreeChars, ...

in the Query Builder grid, it would look like
LastThreeChars: Right([Part Number],3)

You might try doing a search for VBA functions either in online help or via
google before posting questions here. You will save yourself some time at
the least, and likely learn a bit more..
 
A

alecgreen

alecgreen said:
I have a field 'Part Number' which has records of various length, I
want to retrieve the last three characters of this field in my query.

Assuming that it's a text field, or a datatype that can be implicitly
converted to string (text), this will work:

select ..., Right([Part Number],3) As LastThreeChars, ...

in the Query Builder grid, it would look like
LastThreeChars: Right([Part Number],3)

You might try doing a search for VBA functions either in online help or via
google before posting questions here. You will save yourself some time at
the least, and likely learn a bit more..

Thanks for your Help
 

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