Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/12/2007, 15:11
Avatar de shadowGT
shadowGT
 
Fecha de Ingreso: octubre-2007
Mensajes: 11
Antigüedad: 16 años, 6 meses
Puntos: 0
Re: verificar dato en tabla

Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyDown Then
b = UCase(Text2.Text)
Adodc2.RecordSource = "Select * From Inventario where codigo ='" & b & "'"
Adodc2.Refresh

If Text4.Text = "" Then
MsgBox "Codigo Invalido,No Existe", vbCritical + vbOKOnly, "Error"
Text2.Text = ""
Text2.SetFocus
Else
End If
End If
End Sub


Espero te sirva solo cambia el nombre del text y este codigo funciona en el evento KeyDown del control textbox