Código:
Private Sub uprecio_KeyPress(KeyAscii As Integer) KeyAscii = SoloNumeros(KeyAscii) If KeyAscii = 13 Then If codigo.Text = "" Then MsgBox "Ingrese el codigo Primero", vbOKCancel, "Mensaje" uprecio.Text = "" Else If uprecio.Text = "" Then MsgBox "Debe ingresar un precio", vbOKCancel, "Mensaje" Else Dim respuesta As ADODB.Recordset Set miConexion = New ADODB.Connection aux = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=C:\trotter\precios.mdb" miConexion.ConnectionString = aux miConexion.Open miConexion.Execute ("UPDATE producto SET precio = " & uprecio.Text & " where codpro = ' " & codigo.Text & " ' ;") End If End If End If ' del keyascci = 13 End Sub
Gracias desde ya