Searching for empty entries using a combo box (1 Viewer)

cawillwe

Registered User.
Local time
Today, 08:13
Joined
May 8, 2001
Messages
12
I figured this out on my own, as below:
I wrote a function in a module, called CheckNull, which was written as follows:
If IsNull(str) Or IsEmpty(str) Or str = "" Then
CheckNull = strNull
Else
CheckNull = str
End If

Then, for my rowsource, I used :
strSQL = "SELECT DISTINCT CheckNull([" & _
GetFieldName(Me.Controls("Label" & (2 * i + 1)).Tag) & _
"], " & Chr$(34) & "(Null)" & Chr$(34) & _
") AS myField, [" & GetFieldName(Me.Controls("Label" & _
(2 * i + 1)).Tag) & "] FROM [" & cmdGo.Tag & "] WHERE " & _
GetWhereClause(Me.Controls("Label" & (2 * i + 1))) & _
" ORDER BY [" & GetFieldName(Me.Controls("Label" & _
(2 * i + 1)).Tag) & "]"
.RowSource = strSQL

Everything seems to be working now.


[This message has been edited by cawillwe (edited 05-09-2001).]
 

Users who are viewing this thread

Top Bottom