Frank,

01. Pre-Define ALL variables with appropriate Data Type as NULL 
    prior to using ENTER/EDIT USING FormName ...

    Example:

    SET VAR v_Sales_Tax CURRENCY = NULL
    SET VAR v_Subtotal1 CURRENCY = NULL
    SET VAR v_Ticket# INTEGER = NULL

    EDIT USING FormName WHERE .. ORDER BY .. CAPTION .. NOHEADER 

02. Use SELECT command to calculate aggregate function(s) like
    COUNT, MIN, MAX, AVE and SUM ...

    Example:

    SELECT (SUM(Units_x_Price)) INTO V_Subtotal1 INDIC IvSubT +
    FROM S_Ticket_Detail WHERE Sales_Ticket# = .V_Ticket#

03. If the value of variable(s) change for each row, then, you 
    MUST use RECALC VARIABLES to recalculate results in EEP.

04. Always use RETURN at the end of EEP statement(s) to return
    control to next command or column/variable object in a 
    form

    Example:

    -- Tic_Tot.EEP
    RECALC VARIABLES
    SAVEROW
    SELECT (SUM(Units_x_Price)) INTO V_Subtotal1 INDIC IvSubT +
    FROM S_Ticket_Detail WHERE Sales_Ticket# = .V_Ticket#
    RETURN 

Have Fun!

Very Best Regards,

Razzak.

At 07:47 AM 10/21/01 -0600, Frank Carrubba wrote:

>I have a form that uses a region with tiers.  The last field 
>in each tier is a variable that calls and entry exit procedure.  
>The code looks like the following:
>
>*(This program computes the total for the sales ticket)
>*(TIC_TOT.EEP)
>*(HOUSEKEEPING)
>SET ECHO Off
>SET MESSAGES On
>SET ERROR MESSAGES On
>SET VAR v_sales_tax =3D $0.00
>*(BEGIN PROCESSING)
>SAVEROW
>COMP v_subtotal1 AS SUM units_x_price  from s_ticket_detail+
>     WHERE sales_ticket#  =3D .v_ticket#
>
>This worked in the DOS environment.  However, in 6.5 when the 
?SAVEROW executes control is sent to the first command (Set Echo 
>Off).  A loop occurs and eventually a message stating rbase.exe 
>encountered and error and the program will be ended.


===================================-============================
Official R:BASE List Server:    mailto:[EMAIL PROTECTED]
RBTI Events/Training:        http://www.rbase2000.com/events
R:DCC Members:               http://www.rbase2000.com/rdcc
================================================================
R:BASE, Oterro & R:Tango are registered trademarks of RBTI.
==================================-=============================

Reply via email to