Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using SUM, COUNT, etc. in a form with multiple tables
Message
From
04/11/1998 12:32:24
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
04/11/1998 12:22:34
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00154405
Message ID:
00154415
Views:
20
>I have a form with several tables in its data environment. If I want to use SUM to sum a field in one particular table, what should I do? (How can you specify the table in SUM command?) Is there any better way to get a sum of a field in a table without worrying working area while multiple tables exist in a data environment? Thanks in advance.
You can use SQL to sum to an array. So won't worry about current workarea, rec pointer movement etc. ie: select sum(sumfld1), sum(fld2*fld3/3) into array aSums. Further you could set array elements as controlsources of textboxes that would show the sum (so no need for refresh too :).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform