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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Come on all you bright sparks - answer this one!

Status
Not open for further replies.

tedsmith

Programmer
Nov 23, 2000
1,762
0
0
AU
Hi!
I have a datagrid connected to a dataenvironment and 3 text boxes at the bottom of the columns locked to the aggregate totals datamember showing the totals of each column.
When I type a change in one of the datagrid cells, the aggregate totals in the text boxes dont change unless I restart the application. The actual database and the rsCommand recordset does change OK but the aggregate totals do not. I tried all the usual requerys and refreshes on the dataenvironment and the rsTotalRecordset and the text boxes I could find but to no avail.

I can get the totals text boxes to work if I make them unbound boxes and feed them with fields from the aggregate recordset when the row/col changes.
I didnt want to use unbound totals boxes if at all possible as it means more code when you show the form. The dataenvironment should be a nice and clean way of doing it - I hope!
Regards Ted
 
Yes, the value of the aggregate field in Dataenvironment1.rsTotalAggregates does change and the whole thing works if I make the text box unbound and feed the above value into it.
But when I make it an ordinary bound textbox with its datafield the same aggregate, it doesnt change when I change data in the underlying recordset or change the PARAMETER that changes the data - only when I start the application. The datagrid changes as it is bound to the datamember that is the source of the aggregate but the aggregate doesnt when it is bound to the aggregate total datafield.
 
Try bookmarking the record in the recordset to force it to make that record the current record.

If that makes sense?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top