eliminar registros de un mshflexgrid
Publicado por Raul (3 intervenciones) el 05/04/2006 21:32:29
hola!!! tengo duda acerca de como puedo eliminar un registro que selecciono en el mshflexgrid sin utilizar tablas temporales....
Private Sub txtcant_KeyPress(KeyAscii As Integer)
sql = "select * from in_productos where claproducto= " & Me.TxtCodigo1 & " "
Set REC = Vgbd.Execute(sql)
If Not (REC.BOF) And Not (REC.EOF) Then
Me.TxtCodigo1 = REC!claproducto
Me.txtarticulo = REC!nomproducto
Me.TXTpreciocosto = REC!costo
Me.txtcant.SetFocus
Else
MsgBox "No Existe Este Producto", vbInformation, "Validacion de Informacion"
Me.TxtCodigo1.SetFocus
End If
end sub
y en el mshflexgrid solo pongo
Private Sub flexConsultas_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 46 Then
Me.flexConsultas.RemoveItem (Me.flexConsultas.Row)
End If
y al darle click en el msflexgrid al darle click para kerer eliminar me manda ke la variable del objeto with no esta establecida y me manda a depurar a:
Set REC = Vgbd.Execute(sql)
Se ocupa necesariamente tablas temporales?¿??
Private Sub txtcant_KeyPress(KeyAscii As Integer)
sql = "select * from in_productos where claproducto= " & Me.TxtCodigo1 & " "
Set REC = Vgbd.Execute(sql)
If Not (REC.BOF) And Not (REC.EOF) Then
Me.TxtCodigo1 = REC!claproducto
Me.txtarticulo = REC!nomproducto
Me.TXTpreciocosto = REC!costo
Me.txtcant.SetFocus
Else
MsgBox "No Existe Este Producto", vbInformation, "Validacion de Informacion"
Me.TxtCodigo1.SetFocus
End If
end sub
y en el mshflexgrid solo pongo
Private Sub flexConsultas_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 46 Then
Me.flexConsultas.RemoveItem (Me.flexConsultas.Row)
End If
y al darle click en el msflexgrid al darle click para kerer eliminar me manda ke la variable del objeto with no esta establecida y me manda a depurar a:
Set REC = Vgbd.Execute(sql)
Se ocupa necesariamente tablas temporales?¿??
Valora esta pregunta


0