Poui costrure la query controllando le caselle di testo.
Es.

Dim whereAnd As String: whereAnd = " Where "
Dim strQuery As String

strQuery = "SELECT * FROM CLIENTI "

If(Trim(nome)<>"") Then
strQuery = strQuery & whereAnd & " nome='" & nome & "' "
whereAnd = " And "
End If

If(Trim(cognome)<>"") Then
strQuery = strQuery & whereAnd & " cognome='" & cognome & "' "
whereAnd = " And "
End If

dovrebbe andare :gren: