G
Guest
I have a number of triple-state checkboxes on my forms, linked to Long
Integer values. The possible values are, I guess, -1, 0, Null and perhaps
Empty.
I am trying to create a utility function that will return a string value of
"Yes", "No" or "", which I will print on my report. My best guess is this:
Function YesNoNull(ynn As Long) As String
If IsNull(ynn) Then
YesNoNull = ""
Else
YesNoNull = IIf(ynn, "Yes", "No")
End If
End Function
But it still gives #Error values whenever the checkbox is set to the null or
empty state. What am I doing wrong? Or is there a better way to display
Yes/No/blank for a triple-state checkbox field? Thanks!
Integer values. The possible values are, I guess, -1, 0, Null and perhaps
Empty.
I am trying to create a utility function that will return a string value of
"Yes", "No" or "", which I will print on my report. My best guess is this:
Function YesNoNull(ynn As Long) As String
If IsNull(ynn) Then
YesNoNull = ""
Else
YesNoNull = IIf(ynn, "Yes", "No")
End If
End Function
But it still gives #Error values whenever the checkbox is set to the null or
empty state. What am I doing wrong? Or is there a better way to display
Yes/No/blank for a triple-state checkbox field? Thanks!