Visual Basic - CONSULTA CON DATAGRID

Life is soft - evento anual de software empresarial
 
Vista:
sin imagen de perfil

CONSULTA CON DATAGRID

Publicado por ESTHER (37 intervenciones) el 22/07/2003 19:13:21
TENGO UN DATAGRID ASOCIADO CON LA TABLA PACIENTES, PACIENTES TIENE 1CAMPO LLAMADO DOCTOR Y QUIERO QUE EN EL DATAGRID SOLO APAREZCAN LOS PACIENTES DEL DOCTOR QUE SE INDICA EN UNA CAJA DE TEXTO, X EJ:LOS PACIENTES DEL DOCTOR CON CODIGO=5,
HE PROBADO ESTAS 2 COSAS PERO EN EL DATAGRID ME APARECEN TODOS LOS PACIENTES Y SOLO DEBERÍAN ESTAR LOS DEL DOCTOR CON CODIGO=5, ¿QUE ES LO QUE FALLA?
Adodc4.RecordSource = "Select * from pacientes where doctor='" + Text1.Text + "'"
----------------------
cod = Text1.Text
crit = "doctor like '*" & cod & "*'"
Adodc4.Recordset.MoveFirst
Adodc4.Recordset.Find crit
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder