Access - error de for sin next

 
Vista:

error de for sin next

Publicado por LAURA (2 intervenciones) el 24/06/2013 18:42:20
chicos tengo que entregar mi proyecto de visual basic 6.0 pero me sale un error de compilacion "For sin Next"
Sub guardar()
rstdetallesdeventa.AddNew
rstdetallesdeventa!Numerodefactura = Txtnumfac
rstdetallesdeventa!Codigoclientes = TxtCodigoclie
rstdetallesdeventa!Codigoempleados = TxtCodigoem
rstdetallesdeventa!Fecha = TxtFecha
rstdetallesdeventa!Productos = txtcodigoproducto
rstdetallesdeventa!Cantidad = TxtCantidad
rstdetallesdeventa.Update
For I = 0 To LstCodigo.ListCount - 1
rstdetallesdeventa.AddNew
rstdetallesdeventa!Productos = LstCodigo.List(I)
rstdetallesdeventa!Codigoclientes = TxtCodigoclie
rstdetallesdeventa!Cantidad = LstCantidad.List(I)
rstdetallesdeventa.Update


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

error de for sin next

Publicado por 2pl (461 intervenciones) el 24/06/2013 21:28:38
Tan simple como poner al final Next
For I = 0 To LstCodigo.ListCount - 1
rstdetallesdeventa.AddNew
rstdetallesdeventa!Productos = LstCodigo.List(I)
rstdetallesdeventa!Codigoclientes = TxtCodigoclie
rstdetallesdeventa!Cantidad = LstCantidad.List(I)
rstdetallesdeventa.Update
Next
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
1
Comentar

error de for sin next

Publicado por Laura (2 intervenciones) el 24/06/2013 23:28:10
Gracias c:
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