FRED,
You could create a RULE
SUCCEEDS WHERE colname=(SKEEP(colname,'0123456789'))
This assumes there are no blanks. The skeep function would
remove all nondigit characters. thus if there were such
characters the comparison would fail. If it contains only
digits comparison would succeed and rule would be satisfied.
Depending on the entry method you might explore using a format
mask for the input field that restricts input to digits 0 thru
9.
You could also incorporate it SKEEP function in a TRIGGER.
Jim Bentley
--- Fred C Kopp <[EMAIL PROTECTED]> wrote:
> Greetings,
>
> How do I test a user-input text variable to verify that it
> contains only digits (no letters, punctuation or symbols)? I
> want to be able to reject an inappropriate entry. It needs
> to be text because there are often leading zeros.
>
> Thanks,
> Fred
>
> Fred C. Kopp
> Authorized R:Base Developer
> 19 Teri Lane
> Washington, PA 15301
>
> P 724-222-7376
> F 724-222-7376
> C 724-413-5534
> E [EMAIL PROTECTED]
Jim Bentley
American Celiac Society
[EMAIL PROTECTED]
tel: 1-504-737-3293