ADD LIST

PROGINFO 25/10/2010 17:38:53
#355862
OLLHA GALERA TENHO UM PROG AQUI GOSTARIA DE LISTA TODOS OS CLIENTES COM A LETRA Q ELE DIGITA
EX MID(TXTNOM,1,1) VAI PEGA A PRIMEIRA LETRA DA STRING
E JOGO NESSA FUNÇAO AQUI
Public Function buscar_funcionario2(nome As String) As tfuncionario [ô] buscar por nome
Dim fun As tfuncionario
Set tabela = pac.Execute([Ô]select * from Funcionarios where Nome like[ô][Ô] & nome & [Ô]%[ô][Ô])
If Not tabela.EOF Then
fun = preenche_funcionario
End If
buscar_funcionario2 = fun
End Function

NO FORMULARIO DE BUSCA ESTA ASSIM

Dim fun As tfuncionario
fun = buscar_funcionario2(Mid(txtnom.Text, 1, 1))
If txtnom.Text = [Ô][Ô] Then
MsgBox [Ô]Funcionario Não Encontrado![Ô], vbExclamation + vbOKOnly, [Ô]Atenção[Ô]
Else
Do
lst.AddItem ([Ô]Nome:[Ô] & fun.nome & [Ô] [Ô] & [Ô]Código:[Ô] & fun.codfunc & [Ô] [Ô] & [Ô]CPF:[Ô] & fun.cpf)
tabela.MoveNext
Loop Until tabela.EOF
End IfFAZ
QUANDO ELE ADICIONA NO LIST APARECE APENAS O PRIMEIRO NOME DA TABELA QUE TEM A OU SEJA NAO MOSTRA OS OUTRO

QUERO SABER COMO FAZ PRA APARECE
XXXANGELSXXX 25/10/2010 21:06:46
#355875
ta errado isso ai..

tente o seguinte..
private sub txtcampo_change()
Set tabela = pac.Execute([Ô]select * from Funcionarios where Nome like [ô]%[Ô] & txtcampo.text & [Ô]%[ô][Ô])
end sub

ou seja, depois do like ta faltando o %, e tem outra coisa, coloque no evento change do textbox de pesquisa..
Tópico encerrado , respostas não são mais permitidas