Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simple total
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00657787
Message ID:
00657796
Views:
23
I would suggest that you remove TotalPoints field from the table and calculate it on the fly when it's reqired with Sql Select
Select Name, Sum(Points) AS TotalPoints ;
  FROM mytable ;
  WHERE Name = lcName ;
  INTO ARRAY laTotal
To make query faster you can create an index on the Name field.

>Greetings!
>
>I have been out of the programming scene for a few years now, so i have come to ask help on a problem i am having with totaling a numeric field by user and then moveing that total into another field.
>
>I am useing VFP 6.0
>My table consists of 3 fields: Name, Points, and TotalPoints
>
>What i can't seem to accomplish is to get my form to total all amounts in the points field by user then put that total amount into the TotalPoints field. I have tried useing code in the valid, and even lostfocus areas of the points field when designing the input form, but cant seem to accomplish this simple task.
>
>I would be very please to hear from anyone who can shed some light on my delima.
>
>TIA
>Dan
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform