Link to home
Start Free TrialLog in
Avatar of Brainwashed2
Brainwashed2Flag for Germany

asked on

Need help for auto update a running balance in adotable - Part III

Part I: https://www.experts-exchange.com/questions/28387628/Need-help-for-auto-update-a-running-balance-in-adotable.html?anchor=a39927760

Part II: https://www.experts-exchange.com/questions/28390885/Need-help-for-auto-update-a-running-balance-in-adotable-Part-II.html?anchorAnswerId=39936844#a39936844

... and although it works, there is a new problem. I made an import with 500 records. So new access.accdb is only 460 kb but now running ADODataset with AutoCalcFields needs more than 14 !! seconds to update the balance.

Is there any way to speed up like an excel tabsheet?

Next 500 points from me!

Thanks,
Hair fighting Tom
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

If it is no problem, can you post this database file here. (or made some test one)
Is ID and Date fields indexed? (Is ID set as primary key?)
Avatar of Brainwashed2

ASKER

No problem :) See randomized data in attachment.
HHB.accdb
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you for this suggestion. This way was my first strategy, but I wanted to find a solution like Excel with AutoCalcFields.

Your first idea was very good and fast enough, but there was the problem with later added entries and an "useless" new ID. Your second response has now prompted me to another approach. I give each record a unique ID, containing date and a AutoInc time.

02.01.2014 00:00:01
02.01.2014 00:00:02
02.01.2014 00:00:03
03.01.2014 00:00:01
...
15.01.2014 00:00:01
15.01.2014 00:00:02
...
17.01.2014 00:00:01

This way I can use your fast CommandText from your first answer and there is no need, to loop through (perhaps?) >500 entries only at 'refreshtime'.

For your help many thanks and I think, 500 Points are justyfied:)
Thnx. Access databse is simple to use but not powerful ... so glad that solution comes up...