I have a timecard input form, where i enter a time code, a punch in time, and a punch out time. There is another form field named TimeDuration which calculates the difference between these times and multiplies x 24.
Then, based on the code entered, the corresponding time category field will populate on the form (and also in the database). The form is driven by a query, not a table.
What I can't figure out is: when I enter some codes (e.g. "W" or "M") - the corresponding field immediately populates, whichout moving to the next record.
However, if i enter "H", "S", "V", or "B", the form field isn't populated, until i move to the next record. I have to go back 1 record to see that the value is entered.
Maybe I'm using the wrong event to drive this, as I'm using a "lost focus" event on the field "Punch_Out"
Here is the VBA which runs after the Punch_Out field loses focus: Any help would be greatly appreciated!
Here is the VBA that runs when data has been entered in the "Punch Out" field.
The current event is "After Update", but I get the same results when I use the same VBA triggered by Before Update, as well as Lost Focus.
I'm also attaching a screenshot of the form:
Thank you in advance for any assistance you can provide! I'm feeling dumbfounded.
Then, based on the code entered, the corresponding time category field will populate on the form (and also in the database). The form is driven by a query, not a table.
What I can't figure out is: when I enter some codes (e.g. "W" or "M") - the corresponding field immediately populates, whichout moving to the next record.
However, if i enter "H", "S", "V", or "B", the form field isn't populated, until i move to the next record. I have to go back 1 record to see that the value is entered.
Maybe I'm using the wrong event to drive this, as I'm using a "lost focus" event on the field "Punch_Out"
Here is the VBA which runs after the Punch_Out field loses focus: Any help would be greatly appreciated!
Here is the VBA that runs when data has been entered in the "Punch Out" field.
The current event is "After Update", but I get the same results when I use the same VBA triggered by Before Update, as well as Lost Focus.
I'm also attaching a screenshot of the form:
Thank you in advance for any assistance you can provide! I'm feeling dumbfounded.