DAO-Error: too many transactions are nested

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Starting from a dao.recordset - dbdynaset, I got some trouble with the error
message 'too many transactions are nested' each time I try to modify my
active record more than four times.
The modify subroutine starts from the click event on a unbound form.
It has the following VBA Code
rs.edit, rs(0) = activeform.txt_Name, rs.update.
Till now, the error is tackled with the following routine. After 'rs.update':
set rs_2= rs, set rs = nothing, set rs = rs_2, set rs_2= nothing
But I guess there are better ways to do so.
The fact that I never use methods like BeginTrans and CommitTrans makes the
whole thing look very strange.
I also tried to tackle the error like this:
wsp.begintrans, rs.edit, rs(0) = activeform.txt_Name, rs.update,
wsp.committrans
But I got the same error message!
 
Peter Perception said:
Starting from a dao.recordset - dbdynaset, I got some trouble with
the error message 'too many transactions are nested' each time I try
to modify my active record more than four times.
The modify subroutine starts from the click event on a unbound form.
It has the following VBA Code
rs.edit, rs(0) = activeform.txt_Name, rs.update.
Till now, the error is tackled with the following routine. After
'rs.update': set rs_2= rs, set rs = nothing, set rs = rs_2, set rs_2=
nothing
But I guess there are better ways to do so.
The fact that I never use methods like BeginTrans and CommitTrans
makes the whole thing look very strange.
I also tried to tackle the error like this:
wsp.begintrans, rs.edit, rs(0) = activeform.txt_Name, rs.update,
wsp.committrans
But I got the same error message!

I don't think you're giving enough background. Please describe the
intent of what you're doing, and post all the code that is relevant. At
the very least, include whole Click event procedure, including the
declarations and initializations of all objects concerned.
Till now, the error is tackled with the following routine. After
'rs.update': set rs_2= rs, set rs = nothing, set rs = rs_2, set rs_2=
nothing

Does the above actually make a difference? I don't see why it would.
 
Back
Top