DBgrid update

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)
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sinisa VukSoftware architectCommented:
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.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Geert GOracle dbaCommented:
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 dbaCommented:
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 ?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.