retrieve last three characters of field

  • Thread starter Thread starter alecgreen
  • Start date Start date
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
 
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..
 
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
 
Back
Top