Felipe75 Posted June 28, 2016 at 04:37 PM Report #597452 Posted June 28, 2016 at 04:37 PM Dim procuratext, procuramatricula, instrucao As String procuratext = txt_nome.Text procuramatricula = txt_matricula.Text If radioNome.Checked = True Then If txt_nome.Text <> Nothing Then instrucao = "SELECT * FROM Registo WHERE Nome LIKE '" & procuratext & "'" Me.RegistoTableAdapter.Adapter.SelectCommand.CommandText = instrucao Me.RegistoTableAdapter.Fill(Me._OFICINA_MDFDataSet.Registo) Else MsgBox("Por favor preencha o campo de pesquisa.", MsgBoxStyle.Exclamation, "Graze-Oficina de Motos - Nuno Grazina") End If Else txt_matricula.Enabled = False End If If radioMatricula.Checked = True Then If txt_matricula.Text <> Nothing Then instrucao = "SELECT * FROM Registo WHERE Matrícula LIKE '" & procuramatricula & "'" Me.RegistoTableAdapter.Adapter.SelectCommand.CommandText = instrucao Me.RegistoTableAdapter.Fill(Me._OFICINA_MDFDataSet.Registo) Else MsgBox("Por favor preencha o campo de pesquisa.", MsgBoxStyle.Exclamation, "Graze-Oficina de Motos - Nuno Grazina") End If Else txt_nome.Enabled = False End If Alguem me diz o erro do txt_matricula porque o txt_nome funciona
Cerzedelo Posted June 29, 2016 at 09:40 AM Report #597458 Posted June 29, 2016 at 09:40 AM Tem de indicar quais são os erros, caso contrário duvido que alguém lhe responda, porque por estes lados ainda ninguém tem poderes premonitórios.
vikcch Posted June 29, 2016 at 02:58 PM Report #597466 Posted June 29, 2016 at 02:58 PM instrucao = "SELECT * FROM Registo WHERE Matrícula LIKE '" & procuramatricula & "'" pode ser pelo acento no i em Matrícula
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now