Razz,
I put this is a on row exit eep and if the value is zero the message pops up 
but when I click OK it still goes to next row, which I do not want to happen.  
How can I get it to return to the price.
Tom



----- Original Message ----
From: A. Razzak Memon <[EMAIL PROTECTED]>
To: RBASE-L Mailing List <[email protected]>
Sent: Thursday, May 29, 2008 12:23:30 AM
Subject: [RBASE-L] - Re: Checking a value

At 12:09 AM 5/29/2008, TOM HART wrote:

>I have a form with a scrolling region and want to check a
>currency value upon exiting a row.  I do not want a null
>or zero value.  Currently I use a rule to check if the
>value is less than 1.  This works, but does a rule slow
>down a multi-user environment, if so I'm sure there is a
>better way.

Tom,

GETPROPERTY <CurrencyColumnCompID> TEXTVALUE 'varname' is
one of the techniques to validate a value when existing a
row or leaving a field.

Here's how:

-- A very simple example
-- start here ...
CLEAR VAR vCheckValueTxt, vCheckValueCur
SET VAR vCheckValueTxt TEXT = NULL
SET VAR vCheckValueCur CURRENCY = NULL
GETPROPERTY <CurrencyColumnCompID> TEXTVALUE 'vCheckValueTxt'
SET VAR vCheckValueCur = (FLOAT(.vCheckValueTxt))
IF vCheckValueCur > 0.00 THEN
    -- All good ...
    -- Do what you need to do here ...
ELSE
    PAUSE 2 USING 'Amount must be greater than 0.00' ICON STOP
    RETURN
ENDIF
-- end here ...

That's all there is to it!

Have fun.

Very Best R:egards,

Razzak.

Reply via email to