Operation Not Supported in Transactions

  • Thread starter Ivano via AccessMonster.com
  • Start date
I

Ivano via AccessMonster.com

I have following function form_delete event (I can't move to
Form_BeforeDelConfirm because I need the link criteria): When I try to make
changes on the opened for I get the error message "Operation Not Supported in
Transactions". what can I do?



stLinkCriteria = "[ID_loan_mov_back]=" & Me!ID_loan_mov_back
stDocName = "A_msk_veicolo_cliente_mov_back_loan"

Cancel = True

MsgBox "......."


DoCmd.OpenForm stDocName, , , stLinkCriteria, , acDialog


Set dbsveicoli = CurrentDb
Set rsttemp = dbsveicoli.OpenRecordset("select * from tbl_loan_mov_back
where ID_loan_mov_back = " & Me!ID_loan_mov_back)
rsttemp.Delete
rsttemp.Close
Set rsttemp = Nothing
 
A

Arvin Meyer [MVP]

Try this:

CurrentDb.Execute "Delete * from tbl_loan_mov_back where ID_loan_mov_back =
" & Me!ID_loan_mov_back
 
I

Ivano via AccessMonster.com

Thank you but the error occurs before the delete record part of the function
is executed. As you see the form is opened in dialog mode so that the code
stops there.

Try this:

CurrentDb.Execute "Delete * from tbl_loan_mov_back where ID_loan_mov_back =
" & Me!ID_loan_mov_back
I have following function form_delete event (I can't move to
Form_BeforeDelConfirm because I need the link criteria): When I try to
[quoted text clipped - 18 lines]
rsttemp.Close
Set rsttemp = Nothing
 
A

Arvin Meyer [MVP]

Why is it necessary to open the form in Dialog mode? Dialog stops everything
running outside the form.

If you need it on top, just use Popup (set in the form's property sheet) If
you must use Dialog, run the delete code from inside the form.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Ivano via AccessMonster.com said:
Thank you but the error occurs before the delete record part of the
function
is executed. As you see the form is opened in dialog mode so that the code
stops there.

Try this:

CurrentDb.Execute "Delete * from tbl_loan_mov_back where ID_loan_mov_back
=
" & Me!ID_loan_mov_back
I have following function form_delete event (I can't move to
Form_BeforeDelConfirm because I need the link criteria): When I try to
[quoted text clipped - 18 lines]
rsttemp.Close
Set rsttemp = Nothing
 
I

Ivano via AccessMonster.com

Because the user can use the delete botton on his keyboard, but I want him to
write some piece of information before the record is erased. then after he
has completed the information in the form and closes it, the record can be
erase.
Why is it necessary to open the form in Dialog mode? Dialog stops everything
running outside the form.

If you need it on top, just use Popup (set in the form's property sheet) If
you must use Dialog, run the delete code from inside the form.
Thank you but the error occurs before the delete record part of the
function
[quoted text clipped - 11 lines]
 
A

Arvin Meyer [MVP]

acDialog is application modal, not system modal. So if the user doesn't want
to fill out the form, he can just close Access, so the only thing that you
need to do is present him with the form. Popup will do that just as
effectively.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

Ivano via AccessMonster.com said:
Because the user can use the delete botton on his keyboard, but I want him
to
write some piece of information before the record is erased. then after he
has completed the information in the form and closes it, the record can be
erase.
Why is it necessary to open the form in Dialog mode? Dialog stops
everything
running outside the form.

If you need it on top, just use Popup (set in the form's property sheet)
If
you must use Dialog, run the delete code from inside the form.
Thank you but the error occurs before the delete record part of the
function
[quoted text clipped - 11 lines]
rsttemp.Close
Set rsttemp = Nothing
 
I

Ivano via AccessMonster.com

that's right, I could use a pop up form., But the point is that I get the
error message "operation not supported.. and I do not understand why?
acDialog is application modal, not system modal. So if the user doesn't want
to fill out the form, he can just close Access, so the only thing that you
need to do is present him with the form. Popup will do that just as
effectively.
Because the user can use the delete botton on his keyboard, but I want him
to
[quoted text clipped - 14 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top