Update data from DBGrid
From: Ken (sross3_at_bigpond.net.au)
Date: 05/20/04
- Next message: Jeremy Collins: "Re: Still a noob looking for help"
- Previous message: Dave: "Still a noob looking for help"
- Next in thread: Sander Martens: "Re: Update data from DBGrid"
- Reply: Sander Martens: "Re: Update data from DBGrid"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 20 May 2004 05:25:26 GMT
Hi, I have run into a problem with the Delphi 7 app I am writing. I have an
MS-Access database with a few tables in it and using ADO connection. There
is a master/detail relationship between the batch and transactions tables.
I have an entry screen where the user selects the batch they want to work
on, and a DBGrid which displays the transactions for that batch. I want to
update (recalculate) the totals of the transactions credits and debits each
time the user adds a new transaction.
I tried using a query that sums the figures and open it each time a row is
changed, but this causes problems by moving the data cursor. I tried getting
the number of rows in the grid and summing the grid values, which looked
like it was going to work until the number of rows was greater than the grid
displays and it would only total the visible rows.
So. What is the best way to keep a running total of the data entered into a
DBGrid.
Help is always appreciated.
Cheers
Ken
- Next message: Jeremy Collins: "Re: Still a noob looking for help"
- Previous message: Dave: "Still a noob looking for help"
- Next in thread: Sander Martens: "Re: Update data from DBGrid"
- Reply: Sander Martens: "Re: Update data from DBGrid"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|