subform Help

C

Chad

I have a form (frmTSD) that contains a 2 subforms. 1 subform (called
subfrmLabor) is expandable and shows values (of time worked) for each month
of the year for each emp_id that is entered. The tab index is set up so that
each month can be tabbed through in chronological order (Jan, Feb, Mar, Apr,
May etc..)

the other subform (subfrmLabor_Total) shows the total for all of the values
found in each month.

My problem is that in the after update event for each month in subfrmLabor I
need to refresh the subfrmLabor_Total subfrm to reflect these changes.
Unfortunately, the only way I have been able to do this is to refresh the
main form. The problem with doing it this way is that it resets the focus of
subfrmLabor to the first record instead of staying on the record that data
was last entered in.

There are a few ways around this but I am not sure what the best way would
be or how to go about doing these:

1. Refresh only the other sub form (subfrmLabor_Total)
- I have tried doing this with the following code:
Forms!frmTSD!subfrmLabor_Total.Form.Refresh
but nothing happens. Is there another way i could go about this?

2. If there is someway to not refresh frmLabor when the Main form (frmTSD)
is refreshed. This would keep the Focus on the current field, but I am not
sure how to do this if it can even be done.

3. Somehow reset the focus to the record that data was last entered into
once the form is refreshed in subfrmLabor.

Can someone please offer some advice as to what I should do?

Thanks a lot,
Chad
 
Top