Testing for a literal or a number

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a table that has codes like C345, B34B, C34A, and so on.
The last character is significant in that he identifes the plant location
that a part was produced.
I have done a query adding a column called LastChar using the Right function
to segregate the last character from the part number. My results are 5, B,
A, and so on.
What I would like to be able to do is add another column to the query called
TextorNumber that tests the items in the LastChar column and if it is a
number I want the letter X to appear. If it is not a number I want the value
from LastChar to appear.
Thanks for any help.
 
Why not just use IsNumeric()?

IIf(IsNumeric([LastChar]), "X", [LastChar])

JJ
 

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

Back
Top