Does anyone know how I can do the following?
Public Function RecalcCol(frmtemp As Form, DOW As String) As Long
Dim Str As String
RecalcCol = 0.
Str = "frmtemp." & DOW & "1.SetFocus"
exec (Str)
Str = "RecalcCol = RecalcCol + Val(frmtemp." & DOW & "1.Text)"
exec (Str)
...
End Function
DOW could be "Mon", "Tue", etc.
This way I can reuse this function for multiple days of the week.
Thanks,
Ken
Public Function RecalcCol(frmtemp As Form, DOW As String) As Long
Dim Str As String
RecalcCol = 0.
Str = "frmtemp." & DOW & "1.SetFocus"
exec (Str)
Str = "RecalcCol = RecalcCol + Val(frmtemp." & DOW & "1.Text)"
exec (Str)
...
End Function
DOW could be "Mon", "Tue", etc.
This way I can reuse this function for multiple days of the week.
Thanks,
Ken