Visual Basic - CODIGO

Life is soft - evento anual de software empresarial
 
Vista:

CODIGO

Publicado por erikur raudi (41 intervenciones) el 30/03/2007 01:16:31
HOLA A TODOS.

HE CREADO UNA BASE DE DATOS MUY SENCILLA EN ACCES Y LA MANEJO CON VB.

PERO TENGO UN PROBLEMA NECESITO CREAR UN BOTON DE BUSQUEDA.

ESTO ES LO QUE ME GUSTARIA:

ESCRIBIR EN UN TEXT BOX EL NOMBRE DE EMPLEADO Y QUE ME DESPLIEGUE EN OTROS TEXT BOX LA INFORMACION DE ESTE (NOMBRE, CLAVE, DIRECCION, TELEFONO,...) CLARO CADA CAMPO APARECERA EN EL TEXT BOX CORRESPONDIENTE.

ENTONCES TECLEAR EL NOMBRE Y DAR CLICK EN EL BOTON BUSCAR Y QUE EJECUTE LO ANTES MENCIONADO.

ESPERO ME PUEDAN AYUDAR.

GRACIAS
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

RE:CODIGO

Publicado por Alfredo (5 intervenciones) el 30/03/2007 04:40:20
Hola amiga...

aqui te escribo un poco de codigo de como podrias llenar tus cajas de texto

Declaras las siguientes variables
Dim Seleccionar as string
Dim Mrdatos as recordset

seleccionar = "select * from tabla where campo = ' " & txtnombre.text & " ' "
set mrdatos = conexionBd.execute(seleccionar)

if not mrdatos.eof then '' Este es un identificador si encontro registros o no
'''si encontro llena las cajas de texto
txtdireccion.text = mrdatos!direccion
txttelefono.text = mrdatos!telefono

else
msgbox "No se encontro el registro"
end if

y esto seria todo...
Espero y te soluciones tus dudas...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar