Hi,
I'm trying write a VB program to replace a Foxpro program.. but i'm stuck in this problem. I could not find a way or formula to replace this foxpro code:
What I thought was, My_Var is a Total Sum of Field_Name. So I have tried using this code: (Using msflexgrid)
But I get a run-time 6 error: over flow.
Anybody can help me here?
Regards,
Rocky
I'm trying write a VB program to replace a Foxpro program.. but i'm stuck in this problem. I could not find a way or formula to replace this foxpro code:
Code:
Select Table_Name
Calculate Sum(Val(Evaluate(Field_Name) to My_Var
What I thought was, My_Var is a Total Sum of Field_Name. So I have tried using this code: (Using msflexgrid)
Code:
My_Var = 0
For i = 1 to MSFlexgrid.Rows - 1
My_Var = My_Var + MSFlexgrid1.TextMatrix(i, 0)
'(0 = the column where I place the Field_Name values.)
Next
But I get a run-time 6 error: over flow.
Anybody can help me here?
Regards,
Rocky