>hi all,
>
>we have a field in an application that the cusotmer has started using for multiple things and they wish to continue using it that way. initially they may enter some text (20 char field) like COVER COONFIRMED but later they want to enter a PO number that they must supply to their customer to get paid. this PO number if abotu 10 chars long and is comprised of just numbers. they want to ensure that i don't allow them to create an invoice without their being only numbers in this field. I was thinking about going through every character in the field to make sure it is numeric, is there an easier way of doing this?
>
>~M
Try this
yourField = [123df34]
IF LEN(chrtran(yourField , '0123456789','')) # 0
MESSAGEBOX([Error])
ELSE
MESSAGEBOX([All chars are numbers])
ENDIF
yourField = [127634]
IF LEN(chrtran(yourField , '0123456789','')) # 0
MESSAGEBOX([Error])
ELSE
MESSAGEBOX([All chars are numbers])
ENDIF
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst