M
Markus
I have the following function on a form to sum the values
of controls based on the value in other controls. Here is
the function:
Option Compare Database
Option Explicit
Private Function fSumUp()
Dim intHourCount As Integer
Dim varReturn
For intHourCount = 1 To 12
If Me("CB" & intHourCount) = "EV" Then
varReturn = varReturn & Nz(Me("TS" & intHourCount), 0)
End If
Next intHourCount
fSumUp = varReturn
End Function
I have a text box named evRES with =fSumUp() as the
control source. When I switch the form from design view I
get an error mesage thats says End If without Block If.
Any help would be appreciated.
of controls based on the value in other controls. Here is
the function:
Option Compare Database
Option Explicit
Private Function fSumUp()
Dim intHourCount As Integer
Dim varReturn
For intHourCount = 1 To 12
If Me("CB" & intHourCount) = "EV" Then
varReturn = varReturn & Nz(Me("TS" & intHourCount), 0)
End If
Next intHourCount
fSumUp = varReturn
End Function
I have a text box named evRES with =fSumUp() as the
control source. When I switch the form from design view I
get an error mesage thats says End If without Block If.
Any help would be appreciated.