WHERE |
If 1 > 0 Then strWhere = "[1] =" & 1 & " AND " End If If 2 > 0 Then strWhere = strWhere & "[2] =" & 2 & " AND " End If .............. If N > 0 Then strWhere = strWhere & "[N] =" & N & " AND " End If If Len(strWhere) >0 Then strWhere = "WHERE " & Left(strWhere, Len(strWhere) - 5 End if