26 (edited by reteinformatica 2023-05-26 23:04:05)

Re: count working times and overtimes

Hi all, while browsing the forum I came across this thread. I really liked the sparrow project, it shows you the working hours in various ways and always gives you indications that you always have in sight.
But I'm also a bit of a pain in the ass and while studying the project I found a small problem: if the database is empty or there are no drivers, an error window pops up when the program is started (Exemption: List index out of bounce (- 1) Script position 76:2).
And it highlights line 76 in script.
What is the problem? I couldn't figure it out.

27 (edited by sparrow 2023-05-28 11:43:30)

Re: count working times and overtimes

Hi


This is just a draft on which various options for solving the problem were tested.
Of course, there are also errors that you can fix yourself.
The error occurs as a result of selecting the first table row in the Form2_OnShow event.
And there is no line in the table!
In this case, it is enough to build in a check for the number of rows in the drivers
table in the Form2_TgDrv_OnClick event.

Re: count working times and overtimes

Hi Sparrow, Thanks for your reply and clarification. I didn't understand much but I'll do some tests.