Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

postal code check

Status
Not open for further replies.

shummy1

Technical User
Mar 17, 2005
22
CA
I need to come up with a formula that will make sure that the characters entered in the postal code field are valid.

I am creating a report in crystal that pulls the data from a sequal database. Crystal 8.5

I need to check if the first is a letter, the second a number, the third a letter, then a space and so on.

Any suggestions?

s1
 
Based on:

I need to check if the first is a letter, the second a number, the third a letter, then a space and so on.

Try:

if not(isnumber(left({table.field},1)))
and
isnumber(mid({table.field},2,1))
and
not(isnumber(mid({table.field},3,1)))
and
mid({table.field},4,1)= " "
and
...etc...
then
{table.field}
else
"Error in format: " + {table.field}

-k
 
the equation is giving me an error loks like it does not recognize isnumber
I am working with crystal 8.5
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top