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 |
 |
 |
|