DBgrid update

heinven used Ask the Experts™
How can I update my  summary dbgrid automatically when I assign a new record to my descritive dbgrid for exp. when I put new expenses in the one table and have the sum of all the expenses in a different table ( my dbgrids are connected with ms access)
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Software architect
Top Expert 2012
If your dataset is connected to real (access) database - new record will be stored in db, so you need to re-query your second query (sum) - after posting - if both forms are active.
qry.SQL.Text := 'select Period, sum(Value) as Total, ... from tabel2 order by ...'

Open in new window

... if second form is  not active, just re-open query on each OnShow event.
Geert GOracle dba
Top Expert 2009
you can't automatically
an event must be fired and reacted upon

for example  update fires afterupdate and in this you refresh the summary

some grids like devexpress quantumgrid allow summarized fields which are automatically updated
those values are not stored in the database, but in the app grid memory
Geert GOracle dba
Top Expert 2009

fwiw ...
you can take a screenshot with printscreen ...
open paint and paste the image
and then cut out the area you want with crop

did you really use your smartphone for that screenshot ?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial