Error 3003. Demasiadas transacciones anidadas.
Publicado por ROBERTO (145 intervenciones) el 06/05/2010 10:53:52
Hola a todos estoy intentando copiar el contenido de un registro ya guardado de una tabla llamada "REVISION PEDIDOS" sobre un nuevo registro de la misma tabla para asi evitar tener que escribir cosas que se repiten en los campos y me funciona a veces si y otras no y desde hace un tiempo me da este mensaje de error "Se ha producido el error 3003 en tiempo de ejecución:No se pudo iniciar la transacción; ya hay demasiadas transacciones anidadas. Os dejo el código en cuestión a ver si veis algo raro. Un saludo y gracias.
PEDIDO_CC Y ARTI_CC son dos cuadros de texto que he creado para poder elegir el nº de pedido y el articulo del que queremos copiar los datos.
Dim pst As DAO.Recordset
Set pst = CurrentDb.OpenRecordset("REVISION PEDIDOS")
pst.MoveLast
If pst.RecordCount = 0 Then
MsgBox ("No hay registros que modificar"), vbCritical
Exit Sub
End If
pst.MoveFirst
While Not pst.EOF
If pst![REL] = PEDIDO_CC And pst![ARTIC] = ARTI_CC Then
pst.Edit
Me.NSERIE = pst![NSERIE]
Me.CB = pst![CB]
Me.EMBAL = pst![EMBAL]
Me.SERIGRA = pst![SERIGRA]
Me.MANUAL = pst![MANUAL]
Me.ACCESO = pst![ACCESO]
Me.MED = pst![MED]
Me.ESTADO_GENERAL = pst![ESTADO GENERAL]
Me.FUNC = pst![FUNC]
Me.MEJPROX = pst![MEJPROX]
Me.INCI = pst![INCI]
Me.NOTAS = pst![NOTAS]
Me.INST = pst![INST]
Me.MODICATA = pst![MODICATA]
GoTo FIN
Else
pst.MoveNext
End If
Wend
FIN:
pst.Close
End Sub
PEDIDO_CC Y ARTI_CC son dos cuadros de texto que he creado para poder elegir el nº de pedido y el articulo del que queremos copiar los datos.
Dim pst As DAO.Recordset
Set pst = CurrentDb.OpenRecordset("REVISION PEDIDOS")
pst.MoveLast
If pst.RecordCount = 0 Then
MsgBox ("No hay registros que modificar"), vbCritical
Exit Sub
End If
pst.MoveFirst
While Not pst.EOF
If pst![REL] = PEDIDO_CC And pst![ARTIC] = ARTI_CC Then
pst.Edit
Me.NSERIE = pst![NSERIE]
Me.CB = pst![CB]
Me.EMBAL = pst![EMBAL]
Me.SERIGRA = pst![SERIGRA]
Me.MANUAL = pst![MANUAL]
Me.ACCESO = pst![ACCESO]
Me.MED = pst![MED]
Me.ESTADO_GENERAL = pst![ESTADO GENERAL]
Me.FUNC = pst![FUNC]
Me.MEJPROX = pst![MEJPROX]
Me.INCI = pst![INCI]
Me.NOTAS = pst![NOTAS]
Me.INST = pst![INST]
Me.MODICATA = pst![MODICATA]
GoTo FIN
Else
pst.MoveNext
End If
Wend
FIN:
pst.Close
End Sub
Valora esta pregunta
0