How to get the last character of the string?

root2007

New member
Local time
Today, 11:04
Joined
Jan 25, 2012
Messages
9
Hi everyone,

Can you please help me on how to get the last character of the string in query?

I have a table name PlateNo and I want to get the last character for registration purposes.

Ex. ZMD-123 - I want to get the number three(3) and if its possible every time the user types the last digit in criteria it will show all plate number ending in the entered number.

Thank you!
 
Try to do it via:

Like "*" & [Forms]![FormName]![FieldName] & "*"

in the criteria (in Query).
 
will that bring the last digit because there are cases that the plate number may be place on the second or first number.

Ex. ZVD-134, ZDA-321, ZMD-123, ZEE-653

If I use the '*' will it display all the number like for instance the user entered the 3?
Supposedly the result I am looking for are plate numbers ending only in 3 like
ZMD-123 and ZEE-653.

Thank you!
 
In the query create a new col
Testcharacter: right(yourfield,1)

And in the criteria enter your criteria method ie form ref or however you are entering the parameter.

Brian
 

Users who are viewing this thread

Back
Top Bottom