sorry about the delay. Did you find the solution?
a) is easy, you just take the last record Add this into your form:
function on_before_post(item) {
if (item.is_new()) {
let copy = item.copy();
copy.open();
if (copy.rec_count ===0) {
item.tach_in.value = 1;
} else {
item.tach_in.value = item.tach_out.value;
}
}
}
This can be seen on https://msaccess.pythonanywhere.com/ if for example you clone the record it will increase last record by 1.
b) not sure that I follow. Summary is created automatically, like on above app. If Flight duration is needed on the Form (like on the image), than just calculate it with JS. Ie:
function on_edit_form_shown(item) {
if (item.tach_out.value) {
item.flight_total.value = item.tach_out.value - item.tach_in.value;
}
}
If duration is needed on the View grid, than use similar approach as msaccess one for Actual Amount.
Hope this helps.