Hi Karl,
Bad news...neither one of those worked. Would it matter that the
[HoursAccrued] has a control source that points to a function? Because
that
field also has the same #Error in it even though the function has a Null
statement in it. See below...
Function VacHoursEarned(varYears As Variant) As Integer
If IsNull(varYears) Then
VacHoursEarned = Null
Exit Function
End If
Select Case varYears
Case 1
VacHoursEarned = 40
Case 2 To 4
VacHoursEarned = 80
Case 5 To 9
VacHoursEarned = 96
Case 10 To 14
VacHoursEarned = 120
Case 15 To 19
VacHoursEarned = 128
Case 20 To 24
VacHoursEarned = 136
Case 25 To 29
VacHoursEarned = 144
Case 30 To 34
VacHoursEarned = 152
Case Is >= 35
VacHoursEarned = 160
Case Else
VacHoursEarned = Null
End Select
End Function
KARL DEWEY said:
Try this --
=IIF[HoursAccrued]=0,"Your message", [HoursAccrued]/8)
Or this --
=IIF[HoursAccrued] Is Null,"Your message", [HoursAccrued]/8)
:
I have the following formula in the control source of one of my
textboxes and
when there is no data in my "HoursAccrued" field then I get the #Error
displayed in my "DaysAccrued" textbox. How do I get rid of this error?
=[HoursAccrued]/8