I did try the recalc variable but I get the same result. I even tried changing the select to a compute but it made no difference. I traced the eep and I can see the var vGTOT is set to the correct value but the contents of the var field remains 0.00. I also deleted the var field and re-inserted it. This is a form that is called by another form if that makes any difference. John
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of A. Razzak Memon Sent: Wednesday, August 18, 2004 7:40 AM To: RBG7-L Mailing List Subject: [RBG7-L] - Re: setting variable in form At 02:29 AM 8/18/2004 -0400, John Engwer wrote: >I have an eep used in a form to calculate purchase amounts from a purchase >table. For some reason the eep does not run on entry to a var edit field >(vGTOT). It runs fine outside of the form. Any idea what may be wrong? I >tried adding a recalc variable to the eep but it did not help. > >--Sum of current purchases >SELECT SUM(vtprice) + >INTO vGTOT INDICATOR vind_SUM + >FROM purchase + >whe inv# = .vnew_inv_no >return John, Add the RECALC VARIABLES before the RETURN statement in your EEP and see what happens. Your EEP should look like the following: -- Sum of current purchases SELECT (SUM(vtprice)) + INTO vGTOT INDICATOR vind_SUM + FROM purchase + WHERE inv# = .vnew_inv_no RECALC VARIABLES RETURN In order to test "On Entry EEP" for Variable Edit, try the following test and see what happens: PAUSE 2 USING 'This is On Entry EEP' ICON INFO RETURN For more examples, take a look at the "Sales Order" routines and EEPs used in Running R:BASE Your Way! (Part 9). Finally, you may want to TRACE the entire process to see where things are not working. Hope that helps! Very Best R:egards, Razzak.
