DAO to ADO SQL

J

Joao Pedro

Hello, i had this sub working within DAO, now using SQL do not work, how can
i change this?

Thanks, Regards

Private Sub tboxPesquisarClientes_AfterUpdate()
Dim sql As String

Set cn = CurrentProject.Connection

sql = "Select T_CLI_NUMERO, T_CLI_ENTIDADE " & _
"From T_CLIENTES_GERAL " & _
"Where T_CLI_ENTIDADE Like '*" & Me.tboxPesquisarClientes & "*'"

Me.lbClientesFiltrar.RowSource = sql
Me.lbClientesFiltrar.Requery
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top