Ma una cosa del genere non va bene?
codice:Private Sub Comando5_Click() Dim strSQL As String If IsNull(Testo1) Then strSQL = "select * from tabella1" Else strSQL = "select * from tabella1 where data > #" & Format(Testo1, "mm/dd/yyyy") & "#""" End If MsgBox (strSQL) End Sub