Filter Alpha items in UPC's

smilman

New member
Local time
Today, 11:34
Joined
Jan 17, 2019
Messages
5
Dear Query Experts,

I want to highlight UPC's containing alpha characters in a UPC list. I can do this by the statement Non UPC: IIf(InStr(1,[IMMFNO],"A")>0,"Non UPC",""). This statement will bring up all UPC's that contain the letter A. How can I select UPC's that contain any letter "A thru Z" without writing 26 statements?

Did I say you guys are the best and I really appreciate your timely help?

Thanks & regards
Scott
 
Hi Scott. Not sure if this will work but try something like: WHERE FieldName Like "*[a-zA-Z]*"
 
suggest use the Like

perhaps something like

Non UPC: IIf([IMMFNO] Like "*[A-Z]*","Non UPC","")

you might find this link useful
https://support.office.com/en-us/ar...aracters-939e153f-bd30-47e4-a763-61897c87b3f4

an alternative is to come at it from the other end - assuming UPC has alpha chars (and numeric perhaps) and anything else is all numeric you could instead use

Non UPC: IIf(isnumeric([IMMFNO]),"","Non UPC")
 
CJ's answer is probably easier to code and because it is a built-in inspection function, is likely to be coded efficiently.
 
Non UPC: IIf([IMMFNO] Like "*[A-Z]*","Non UPC","") worked perfectly - thank-you.
 

Users who are viewing this thread

Back
Top Bottom