List of years with totals of hours (1 Viewer)

wim1981

Registered User.
Local time
Today, 15:19
Joined
May 20, 2015
Messages
40
Hi

I have a continious form with textfields as records. Its about total course hours that are calculated. There is a field in the records that holds and calculates the hourse that one have done and another field that holds the max hours they may follow for one year.
Every record has h different year.

When the amount of hours in the transmission textfield is negative, they can transmit the hours to te next year. Therefore i have to calculate the Max hours per Year + the transmission hours.

So the calculation is not a problem. Though i don't actually know where i can trigger the calculation. I have tried it with a button on the form, but then te user always have to click to see the right amount of hours for the next year. That's not handy. I am looking for a way to automattically calculate the field Max hours per year. Given that the Max hours per year is a bound field, its bound to a table where i stock the Max hours that i have calculated.

I also tried it with the button that's used for inserting new course hours, but then it canculates with the old values instead of the new ones.

How can i trigger the calculation automattically without using a button.

Regards
Wim
 

JHB

Have been here a while
Local time
Today, 15:19
Joined
Jun 17, 2012
Messages
7,732
You can do the calculation on "OnCurrent" event when you arrive a "new" record.
I also tried it with the button that's used for inserting new course hours, but then it canculates with the old values instead of the new ones.
Place a "Me.Dirty = False" in your code before you do the calculation, then the data is written to the table!
 

Users who are viewing this thread

Top Bottom