Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Column Totals from Grid 2

Status
Not open for further replies.

taysys

Programmer
Dec 7, 2001
41
US
I am using VFP7, Codemine v7, Windows 2000.

I have a form where I have two related grids. The parent selects related child records. I need to total the "amount" columns in the child for the user to view. I have tried different events that fire from the parent, but either I don't get the correct numbers or it messes up the child display.

Where is the best event to perform a column totaling routine in a grid?

Thanks...

Bob Taylor
 
Create an SQL statement into a cursor, based on the order number.
Create a textbox (call it GridTotal) and place it just below your grid.
put this code in the grid.Refresh()
Code:
LOCAL lcCustno
STORE THISFORM.Custno to lcCustno
SELECT sum(soldamount) as grTot FROM working WHERE working.cusno = lcCustno INTO CURSOR mycursor
thisform.gridtotal.value = myCursor.grTot
 
Finally had a chance to work on this. Works great and is fast. Good work... Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top