seleccionar la fila!!!
Publicado por yoshita7898 (11 intervenciones) el 14/11/2008 13:29:45
hola les cuento
no logro editar la fila seleccionada en el listview
porque no me muestra los datos solo
me muestra la primera fila...
y ya no se q hacer espero de su ayuda porfavor
les dejo el codigo q utilizo
agradesco mucho su ayuda...
Private Sub ListView1_keypress(keyascii As Integer)
If keyascii = 13 Then
Text1.Text = ListView1.SelectedItem
Set baseTB = OpenDatabase(App.Path & "ase de datosd1.mdb")
Set regTB = baseTB.OpenRecordset("SELECT * FROM farmacos WHERE Codigo =" & Text1.Text, dbOpenDynaset)
If regTB.RecordCount = 0 Then
MsgBox "no existe"
Commandgrabar.Enabled = True
Text1.SetFocus
Else
Commandeliminar.Enabled = True
Commandactualizar.Enabled = True
Text2.Text = regTB!fecha
Text3.Text = regTB!guia
Text4.Text = regTB!proveedor
Text5.Text = regTB!cantidad
Text6.Text = regTB!devolucion
Text7.Text = regTB!presentacion
Text8.Text = regTB!medicamento
Text9.Text = regTB!farmacia
Text10.Text = regTB!trapi
Text11.Text = regTB!vivanco
Text12.Text = regTB!crucero
Text13.Text = regTB!cayurruca
Text14.Text = regTB!mantilhue
Text15.Text = regTB!futahuente
Text16.Text = regTB!carimallin
Text17.Text = regTB!sector1
Text18.Text = regTB!sector2
Text19.Text = regTB!sector3
Text20.Text = regTB!procedimiento
Text21.Text = regTB!clinicasdentales1
Text22.Text = regTB!clinicasdentales2
Text23.Text = regTB!clinicasdentales3
Text24.Text = regTB!clinicasdentales4
Text25.Text = regTB!ira
Text26.Text = regTB!era
Text27.Text = regTB!salamotora
Text28.Text = regTB!prestamos
Text29.Text = regTB!saldo
End If
End If
End Sub
no logro editar la fila seleccionada en el listview
porque no me muestra los datos solo
me muestra la primera fila...
y ya no se q hacer espero de su ayuda porfavor
les dejo el codigo q utilizo
agradesco mucho su ayuda...
Private Sub ListView1_keypress(keyascii As Integer)
If keyascii = 13 Then
Text1.Text = ListView1.SelectedItem
Set baseTB = OpenDatabase(App.Path & "ase de datosd1.mdb")
Set regTB = baseTB.OpenRecordset("SELECT * FROM farmacos WHERE Codigo =" & Text1.Text, dbOpenDynaset)
If regTB.RecordCount = 0 Then
MsgBox "no existe"
Commandgrabar.Enabled = True
Text1.SetFocus
Else
Commandeliminar.Enabled = True
Commandactualizar.Enabled = True
Text2.Text = regTB!fecha
Text3.Text = regTB!guia
Text4.Text = regTB!proveedor
Text5.Text = regTB!cantidad
Text6.Text = regTB!devolucion
Text7.Text = regTB!presentacion
Text8.Text = regTB!medicamento
Text9.Text = regTB!farmacia
Text10.Text = regTB!trapi
Text11.Text = regTB!vivanco
Text12.Text = regTB!crucero
Text13.Text = regTB!cayurruca
Text14.Text = regTB!mantilhue
Text15.Text = regTB!futahuente
Text16.Text = regTB!carimallin
Text17.Text = regTB!sector1
Text18.Text = regTB!sector2
Text19.Text = regTB!sector3
Text20.Text = regTB!procedimiento
Text21.Text = regTB!clinicasdentales1
Text22.Text = regTB!clinicasdentales2
Text23.Text = regTB!clinicasdentales3
Text24.Text = regTB!clinicasdentales4
Text25.Text = regTB!ira
Text26.Text = regTB!era
Text27.Text = regTB!salamotora
Text28.Text = regTB!prestamos
Text29.Text = regTB!saldo
End If
End If
End Sub
Valora esta pregunta


0