Thanks I'll give it a try.
-----Original Message-----
From: Creative Digital Publishing Inc. <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Tuesday, May 18, 1999 3:51 PM
Subject: Re: Numeric field with negative numbers
>>Is there any reason a field set as a numeric type will not accept negative
>>numbers? Last I checked, numbers less than zero still existed. ;-)
>
>A definite oversight in the number-handling routines. Here's how we handled
>it in our EditFormHandleKeystroke function:
>
>// at the very end of the keystroke-handling routine,
>// filter characters for numeric field to allow negative #s
>
> fldPtr = GetFocusObjectPtr ( );
> if ( fldPtr ) {
> if ( fldPtr->id == theFieldThatNeedsNegNumbers ) {
> if ( IsPrint ( GetCharAttr ( ), key )) {
> if (( ! IsDigit ( GetCharAttr ( ), key )) && ( key != '-' )) {
> return ( true );
> } } } }
> return ( false);
>
>Hope that helps.
>
>Regards,
>Steve Mann
>
>-------------------------------------------
>Creative Digital Publishing Inc.
>1317 Palm Street, San Luis Obispo, CA 93401-3117
>-------------------------------------------
>805.788.0138 805.593.3811 (fax)
>[EMAIL PROTECTED] http://www.cdpubs.com
>
>
>
>