VB6 (sp5), ADO, Access 97
I want to filter my records using two (2) Where clauses. I don't want any record to show in my list box, etc. that contains nothing (blank, null, zip) in the department field of my recordset.
WHERE(tbl_ApplicationUsers.UserDepartment IS NOT NULL)
WHERE(tbl_ApplicationUsers.UserDepartment = "")
Is this possible?
' Fill the Department Combo Box
sSqlDepartment = "Select tbl_ApplicationUsers.UserDepartment From tbl_ApplicationUsers "
& "WHERE(tbl_ApplicationUsers.UserDepartment IS NOT NULL) " _
& "GROUP BY UserDepartment " _
& "ORDER BY UserDepartment ASC;"
rst.CursorLocation = adUseClient
rst.Open sSqlDepartment, App_Conn, adOpenKeyset, adLockOptimistic '
Do While Not rst.EOF