Help with subforms fetching

Help with subforms fetching

Hi guys can anyone help me.

I have a system to control machines where a have 3 forms. First one is a base lookup form that goes:

Shift             Start Hour            Finish Hour
Day              6                           15
Afternoon    15                         0
Night            0                           23

Second one is called Shift that goes

Date             Shift           Operator           Equipment
25/06/18      Day            Joel                  EX43

And the third one is a subform of the second one where register all activities

Start Hour   Finish Hour     Activity
6,0               6,5                   Prestart
6,5               7,0                    Tramming
7,0                9,5                   Operating
....
9,5                15                   Shift Change

What I want to do in this subform is whenever I add another activity it reads if it is the first activity if it is it reads from the first form what is the default Start Hour for that shift selected and populates the start hour, if its not the first row on the subform it reads the previous Finish Hour inputed because they necessarily needs to be the same and for all rows it and for all rows the Finish Hour gets populated with the default from the first form to reinforce that the Finish Hour for that shift needs to be the same.

Thanks for the help guys.