CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Sum Fields from 2 Grids

Print topic Send  topic

Author Message
Orlando
Posted: 10/23/2004, 3:14 PM

I Have Grid1, Grid2 and Grid3 in the same page, I need to Sum Field1 (Grid1) + Field2 (Grid2) and use that value in a Sum in Grid3.

I tryied to assign it to a variable:
Dim Cr2
Cr2 = Grid2.datasource.recordset.fields("Credit2")

but when I call this variable in the Grid3 it appears empty

All grids only had 1 row...

It could be better to pull the values directly from the database, and assign them to variables, so Grid1 and Grid2 would not be necessary
peterr


Posts: 5971
Posted: 10/24/2004, 6:10 AM

Looks like Cr2 is declared locally for one event (function). Try declaring 'Dim Cr2' outside of the event, in the white area between events.
If you like to pull the values directly from the database, you can use the CCDLookUp function as shown at http://docs.codecharge.com/studio/html/ProgrammingTechn...gleDBValue.html
You can replace "user_name" in the example with an SQL function that calculates the value you need.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.