tengo una problema con esta sintaxis , alguien me puede ayudar ?
Quiero que actualize los datos si existe el cliente y lo encuentra
Private Sub txtBuscarCliente_KeyPress(KeyAscii As Integer)
On Error Resume Next
Dim criterio As String
'If KeyAscii = vbKeyReturn And txtCodigoMasc.Text <> "" Then
variable = Val(txtCodigoMasc)
If KeyAscii = vbKeyReturn Then
dscliente.Recordset.FindFirst ("Codigo=" & txtID.Text)
If dscliente.Recordset.NoMatch Then
MsgBox "No se encontró el Cliente", vbCritical, " E R R O R "
Else
KeyAscii = 0
If MsgBox("RELAMENTE DESEA CAMBIAR LA MASCOTA DE DUEÑO !!!!!!!!!", vbOKCancel, " C U I D A D O..... ") = vbOK Then
'If MsgBox(" Realmente desea ANULAR este Comprobante ?", vbOKCancel) = vbOK Then
'llave = "update tbmascotas set codcliente=" & txtID & " where codmascota=" & txtCodigoMasc.Text & ""
llave = "update tbmascotas set codcliente=" & txtID.Text & " where codmascota=" & txtCodigoMasc & ""
dsmascotas1.Database.Execute llave
dsmascotas1.Refresh
llave1 = "update tbPlanVacunacion set codcliente=" & txtID & " where codmascota=" & txtCodigoMasc & ""
dsVacunas.Database.Execute llave1
dsVacunas.Refresh
End If
Unload Me
End If
End If
End Sub
gracias