I have a table with a field that contains 13-18 digit "type" codes. I wish to run a query that will return only the last three digits of this code.
Is there a way of formatting the field in the query to do this? Or some other method?
If the database field is of type Text, change the field in the query grid to "TypeLast3: Right$([Type],3)"
If the database field is of type Number, use this instead: "TypeLast3: [Type] Mod 1000". If you use this, leading zeros on the last three digits will be suppressed. If you don't want that, try this: "TypeLast3: Right$(Format$([Type],"000",3)" Rick Sprague
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.