Mark,

Rather than do all this pattern matching, how about you do a lose-focus set 
fields to a hidden, display only, integer field and then set it back to the 
original character field.  Whatever is left in the character field *will* be an 
integer, regardless of any alpha characters which were included.

I'm not sure if you intended to exclude zero when you said "positive and 
negative numbers only," but you could display an error message if the result is 
zero after the conversion to an integer and back.

Doug

On Feb 2, 2010, at 9:44 AM, Mark Milke wrote:

> Hi there,
> 
> I have a character field that I need to convert into an integer field
> or to emulate a field that accepts positive and negative numbers only.
> 
> This:  'Field1' LIKE  "%[^0-9]%" works just fine to enforce numbers
> only.
> 
> But how to enforce, that an input consists of numbers only and *can*
> start with a "-" (emulation of negative numbers)?
> 
> Thanks,
> Mark
> 
> _______________________________________________________________________________
> UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
> Platinum Sponsor:[email protected] ARSlist: "Where the Answers Are"



Doug

--
Doug Blair
[email protected]
+1 224-558-5462

200 North Arlington Heights Road
Arlington Heights, Illinois 60004



_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:[email protected] ARSlist: "Where the Answers Are"

<<inline: bmc_skilled_pro_ar.png>>



_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
Platinum Sponsor:[email protected] ARSlist: "Where the Answers Are"

Reply via email to