I am trying to set values in controls on subforms, where the subform is on a tab control, so that I can autofill the default working hours for employees, without having to key all days individually. Here is my code..... ANY help anyone can offer would be GREATLY appreciated.

Function CreateRecords()
On Error GoTo Err_Handler

Dim DefaultTS As Form, WeekDay, MyControl As Control, xName As String
Dim ActiveSubForm As String
ActiveSubForm = sfrm

EnteredStart = [forms]![frm_UserVarTSDefaultHours](sfrm)![Start]
EnteredFinish = [forms]![frm_UserVarTSDefaultHours](sfrm)![Finish]
EnteredBreak = Nz([forms]![frm_UserVarTSDefaultHours](sfrm)![Break], "")
EnteredHours = [forms]![frm_UserVarTSDefaultHours](sfrm)![Hours]

qryInsyncHours = "qry_eeCompensateDefHours"

Set DefaultTS = Screen.ActiveForm

'Check each data entry control for change and record
'old value of Control.
For Each WeekDay In DefaultTS.Controls

'Only check data entry type controls.
Select Case WeekDay.ControlType
Case acSubform
' Skip the active Sub Form.

If WeekDay.Name <> sfrm Then
For Each MyControl In WeekDay.Controls

'AutoFill the Controls
Select Case MyControl.Name
Case "Start": MyControl.Value = EnteredStart
Case "Finish": MyControl.Value = EnteredFinish
Case "Break": MyControl.Value = EnteredBreak
Case "Hours": MyControl.Value = EnteredHours
End Select

Next MyControl
Set MyControl = Nothing
End If

End Select
Next WeekDay
Set WeekDay = Nothing

Exit Function

If Err.number <> 64535 Then
MsgBox "Error #: " & Err.number & vbCrLf & "Description: " & Err.Description
End If
Resume TryNextWeekDay
End Function