Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Not the return value I expected
Message
From
13/03/2002 18:05:06
Jorge Haro
Independent Consultant
Juarez, Mexico
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00632457
Message ID:
00632465
Views:
12
You are asigning the generated cursor to a numeric (currency) value, you need to assign the value stored in the field of the cursor generated. Change your code to this (notice the lines with ySum):
local ldLastYear, lcThisClient, curLastYearSales

***

ldLastYear = YEAR(DATE()) - 1
lcThisClient = thisform.cboClientName.Value


SELECT SUM(Cdm30wrk.wrk_tlamt) as ySum;
 FROM  classicdb!cdm30wrk;
 WHERE Cdm30wrk.wrk_stat = "A-ACCTNG" = .T.;
   AND Cdm30wrk.wrk_page = 1;
   AND ALLT(Cdm30wrk.cmp_name) = lcThisClient;
   AND YEAR(Cdm30wrk.date_updt) = ldLastYear;
into cursor curLastYearSales
thisform.pgfClientDetails.pagAccountDetails.txtLastYearSales.value = curLastYearSales.ySum
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform