I have a db used for tracking employee hours. Time is broken down into categories ie; regular, OT, sick, vacation etc. I have the following number settings for the categories;
Data type; number
Field size; single
Decimal places; 2
Default value; 0
As I enter data, I would like to have a running total shown in a “week total” field. Seems like I’ve gone thru all of the events that would trigger this (on load, on current) for the form and I see no on load or on current event for the field. Only way I can get a running total is to close the form then reopen it. My code for the on current event of the form is;
Private Sub Form_Current()
Me.SubtotalFirstWeekHours = Me.Hours1 + Me.Hours2 + Me.Hours3 + Me.Hours4 + MeHours5 + Me.Hours6 + Me.Hours7
End sub
I’ve tried a requery but it’s really slow and still is not triggered at the right time. Any thoughts would be appreciated
Thank you
Data type; number
Field size; single
Decimal places; 2
Default value; 0
As I enter data, I would like to have a running total shown in a “week total” field. Seems like I’ve gone thru all of the events that would trigger this (on load, on current) for the form and I see no on load or on current event for the field. Only way I can get a running total is to close the form then reopen it. My code for the on current event of the form is;
Private Sub Form_Current()
Me.SubtotalFirstWeekHours = Me.Hours1 + Me.Hours2 + Me.Hours3 + Me.Hours4 + MeHours5 + Me.Hours6 + Me.Hours7
End sub
I’ve tried a requery but it’s really slow and still is not triggered at the right time. Any thoughts would be appreciated
Thank you