Split field?

  • Thread starter Thread starter Jennifer
  • Start date Start date
J

Jennifer

I have a field for truck codes:

MAD1
PRY3
FLL0
PR56
US23

I need to pull the LAST number and put in a new field. The last number is
ALWAYS a number but somethimes there are other numbers in the field. They are
ALL 4 places.

Is there a formula I can use?

Thanks!
 
This will get the last character of the field in a query if you put in the
correct field name between the [ ].

TheNumber: Right([Truck Code Field],1)

You could use Right([Truck Code Field],1) as the update to in an update
query for the field where you want to store the number.
 
THANK YOU!

Jerry Whittle said:
This will get the last character of the field in a query if you put in the
correct field name between the [ ].

TheNumber: Right([Truck Code Field],1)

You could use Right([Truck Code Field],1) as the update to in an update
query for the field where you want to store the number.


--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


Jennifer said:
I have a field for truck codes:

MAD1
PRY3
FLL0
PR56
US23

I need to pull the LAST number and put in a new field. The last number is
ALWAYS a number but somethimes there are other numbers in the field. They are
ALL 4 places.

Is there a formula I can use?

Thanks!
 
Jennifer said:
I have a field for truck codes:

MAD1
PRY3
FLL0
PR56
US23

I need to pull the LAST number and put in a new field. The last number is
ALWAYS a number but somethimes there are other numbers in the field. They are
ALL 4 places.


You can get the last digit by using Right(thefield, 1)
 
Back
Top