Search In VB

Italiano21

New member
Local time
Today, 10:20
Joined
Aug 30, 2006
Messages
2
I need some help with a search code in visual basic...
first i began to use FindFirst to do the search but i need something more specific ... i access a database by a recordset
i'm going to post the code here... if someone could help me i would be very gratefull... i didn'y put my doubt well...
i tried to use a select for the search but i gives me an error saying that was expected a case...

Code:
Private Sub cmdProcurar_Click()
Dim Procura As String
Procura = InputBox("Indique o Nome da Pessoa Que Pretende Procurar?", "Procura")
Select*From T_Nomes Where Nome = Procura" ----------------> Here It Gives Me An Error, What Should i Do?
With T_Nomes
txtNome.Text = !Nome
txtTelefone.Text = !Telefone
txtMorada.Text = !Morada
txtEmail.Text = !Email
txtZona.Text = !Zona
txtDataNascimento.Text = !DataNascimento
txtEscola.Text = !Escola
txtAnoEscolaridade.Text = !AnoEscolaridade
txtDataAdesao.Text = !DataAdesao
End With
If T_Nomes.NoMatch Then
Msg = "Registo Não Encontrado"
Resposta = MsgBox(Msg, vbOKOnly + vbExclamation + vbDefaultButton1, "Militantes JS")
End If
cmdAdicionar.Enabled = True
cmdEditar.Enabled = True
End Sub

what should i change?
thanks in advance
 
Last edited:

Users who are viewing this thread

Back
Top Bottom