Visual Basic - seleccionar la fila!!!

Life is soft - evento anual de software empresarial
 
Vista:

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
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:seleccionar la fila!!!

Publicado por quique (63 intervenciones) el 14/11/2008 18:06:13
pero... ¿cuando le das al ENTER hay algún item seleccionado qu no sea el primero?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

RE:seleccionar la fila!!!

Publicado por yoshita7898 (11 intervenciones) el 14/11/2008 18:50:15
mmm...primero selecciono el primer registro y ese me anda bien

despues selecciono el segundo y me muestra los datos del primer registro...

ej:
codigo presentacion medicamento
1- 51142002 cj x 100 aspirina
2- 51142003 cj x 30 dipirona

cuando selecciono la primera fila me muestra bien los datos pero al seleccionar la segunda fila este me muestra lo sgte

Codigo presentacion medicamento
51142003 cj x 100 aspirina

ojala se pueda entender
ahhh uso Dao

Saludos y gracias por todo.
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar