otra cosa cuales son los codigos para
buscar un registro
ir al primer registro
al ultimo
modificar
Eso desde ya les agradesco y porfa que tengo ma len el siguiente codigo que no me deja agregar bien pero por lo que identifico el error esta en el keyprees
Código PHP:
Dim i As Integer
Dim total As Integer
Private Sub mostrar()
Me.Text = "REGISTRO " & (i + 1) & " DE " & total
drFila = DataSet21.Tables("Cliente").Rows(i)
txtRut.Text = drFila.Item("Rut")
txtNombre.Text = drFila.Item("Nombre")
txtDireccion.Text = drFila.Item("Direccion")
txtTelefono.Text = drFila.Item("Telefono")
End Sub
Private Sub actualizar()
Me.OleDbDataAdapter2().Update(DataSet21, "Cliente")
Me.DataSet21.AcceptChanges()
End Sub
Private Sub Frmingresousuario_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.OleDbDataAdapter2.Fill(DataSet21, "Cliente")
i = i
total = DataSet21.Tables("Cliente").Rows.Count
mostrar()
End Sub
Private Sub btnAdelante_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdelante.Click
i = i + 1
If i = total Then
i = total - 1
End If
mostrar()
End Sub
Private Sub BtnAgregar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAgregar.Click
txtRut.Text = ""
txtNombre.Text = ""
txtDireccion.Text = ""
txtTelefono.Text = ""
txtRut.ReadOnly = False
txtRut.Focus()
End Sub
Private Sub txtRut_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtRut.KeyPress
If e.KeyChar = Microsoft.VisualBasic.Chr(13) Then
txtRut.ReadOnly = True
drFila = Me.DataSet21.Tables("Cliente").NewRow()
drFila.Item("Rut") = txtRut.Text
drFila.Item("Nombre") = txtNombre.Text
drFila.Item("Direccion") = txtDireccion.Text
drFila.Item("Telefono") = txtTelefono.Text
Me.DataSet21.Tables("Cliente").Rows.Add(drFila)
total = total + 1
i = 0
actualizar()
mostrar()
End If
End Sub
Private Sub btnEliminar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEliminar.Click
drFila.Delete()
total = total - 1
i = 0
actualizar()
mostrar()
End Sub
Private Sub BtnAtras_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAtras.Click
i = i - 1
If i < 0 Then
i = 0
End If
mostrar()
End Sub