If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"Operation Not Supported In Transactions"
Can someone please explain this new message I'm getting when I delete records
from a subform in datasheet view? Thanks in advance, Pam |
#2
|
|||
|
|||
"Operation Not Supported In Transactions"
The problem might be the event you chose to delete the record.
Access uses a transaction around its own deletions and edits. If something like this is already in progress, your deletion clashes with it. Since you are in datasheet view, you are not using a command button. If you are using something like the KeyDown event, be sure to destroy the keystoke first, e.g.: Me.KeyCode = 0 Then test if the form is dirty, and if so undo it: If Me.Dirty Then Me.Dirty = False Then check that you are not at a new record, and delete: If Not Me.NewRecord Then RunCommand acCmdDeleteRecord -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "PHisaw" wrote in message ... Can someone please explain this new message I'm getting when I delete records from a subform in datasheet view? Thanks in advance, Pam |
#3
|
|||
|
|||
"Operation Not Supported In Transactions"
Allen,
Thanks for the reply. I use the mouse to highlight all the records I want to delete down the left side of column and then use the "X" delete shortcut button at the top of the screen. This is the first time I've ran across this error. Should I use something else when there is a need to delete? Pam "Allen Browne" wrote: The problem might be the event you chose to delete the record. Access uses a transaction around its own deletions and edits. If something like this is already in progress, your deletion clashes with it. Since you are in datasheet view, you are not using a command button. If you are using something like the KeyDown event, be sure to destroy the keystoke first, e.g.: Me.KeyCode = 0 Then test if the form is dirty, and if so undo it: If Me.Dirty Then Me.Dirty = False Then check that you are not at a new record, and delete: If Not Me.NewRecord Then RunCommand acCmdDeleteRecord -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "PHisaw" wrote in message ... Can someone please explain this new message I'm getting when I delete records from a subform in datasheet view? Thanks in advance, Pam |
#4
|
|||
|
|||
"Operation Not Supported In Transactions"
The Delete button on the toolbar should work fine, unless something else is
going on. Have you opened recordsets in code? Is the record dirty at the time? Is the form bound to a query that is not updatable? Is there any other code running at the time? Have you used OpenTrans in code? Is there any other form or process open at the same time, referring to the same records? -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "PHisaw" wrote in message ... Allen, Thanks for the reply. I use the mouse to highlight all the records I want to delete down the left side of column and then use the "X" delete shortcut button at the top of the screen. This is the first time I've ran across this error. Should I use something else when there is a need to delete? Pam "Allen Browne" wrote: The problem might be the event you chose to delete the record. Access uses a transaction around its own deletions and edits. If something like this is already in progress, your deletion clashes with it. Since you are in datasheet view, you are not using a command button. If you are using something like the KeyDown event, be sure to destroy the keystoke first, e.g.: Me.KeyCode = 0 Then test if the form is dirty, and if so undo it: If Me.Dirty Then Me.Dirty = False Then check that you are not at a new record, and delete: If Not Me.NewRecord Then RunCommand acCmdDeleteRecord -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "PHisaw" wrote in message ... Can someone please explain this new message I'm getting when I delete records from a subform in datasheet view? Thanks in advance, Pam |
#5
|
|||
|
|||
"Operation Not Supported In Transactions"
Allen,
Please see responses to your questions below. I'm still not sure what is causing this, but would very much like to find out. Pam "Allen Browne" wrote: The Delete button on the toolbar should work fine, unless something else is going on. Have you opened recordsets in code? The only code associated with this is the NotInList and an update for a hidden text box to populate another subform. I've posted those below: Private Sub cboPartNumber_NotInList(NewData As String, Response As Integer) Dim DB As Database Set DB = CurrentDb DB.Execute "INSERT INTO tAssemblyDescriptions (PartNumber) VALUES (""" & NewData & """)", dbFailOnError Response = acDataErrAdded Exit_cboPartNumber_NotInList: Exit Sub Err_cboPartNumber_NotInList: MsgBox Err.Description Resume Exit_cboPartNumber_NotInList End Sub Private Sub cboPartNumber_Exit(Cancel As Integer) Forms![fManufacturing]!txtPartNumber.Requery End Sub Is the record dirty at the time? Not sure, please explain. Is the form bound to a query that is not updatable? It's recordsource is a table. Is there any other code running at the time? Have you used OpenTrans in code? No Is there any other form or process open at the same time, referring to the same records? No -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "PHisaw" wrote in message ... Allen, Thanks for the reply. I use the mouse to highlight all the records I want to delete down the left side of column and then use the "X" delete shortcut button at the top of the screen. This is the first time I've ran across this error. Should I use something else when there is a need to delete? Pam "Allen Browne" wrote: The problem might be the event you chose to delete the record. Access uses a transaction around its own deletions and edits. If something like this is already in progress, your deletion clashes with it. Since you are in datasheet view, you are not using a command button. If you are using something like the KeyDown event, be sure to destroy the keystoke first, e.g.: Me.KeyCode = 0 Then test if the form is dirty, and if so undo it: If Me.Dirty Then Me.Dirty = False Then check that you are not at a new record, and delete: If Not Me.NewRecord Then RunCommand acCmdDeleteRecord -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "PHisaw" wrote in message ... Can someone please explain this new message I'm getting when I delete records from a subform in datasheet view? Thanks in advance, Pam |
#6
|
|||
|
|||
"Operation Not Supported In Transactions"
Try it with the focus in something other than cboPartNumber.
If the problem is still there, then that code is not a contributing factor. (I am assuming this form is not bound to tAssemblyDescriptions.) You could check that you have the latest service pack for your version of Office and JET. Other than that, I don't know what to suggest. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "PHisaw" wrote in message news Allen, Please see responses to your questions below. I'm still not sure what is causing this, but would very much like to find out. Pam "Allen Browne" wrote: The Delete button on the toolbar should work fine, unless something else is going on. Have you opened recordsets in code? The only code associated with this is the NotInList and an update for a hidden text box to populate another subform. I've posted those below: Private Sub cboPartNumber_NotInList(NewData As String, Response As Integer) Dim DB As Database Set DB = CurrentDb DB.Execute "INSERT INTO tAssemblyDescriptions (PartNumber) VALUES (""" & NewData & """)", dbFailOnError Response = acDataErrAdded Exit_cboPartNumber_NotInList: Exit Sub Err_cboPartNumber_NotInList: MsgBox Err.Description Resume Exit_cboPartNumber_NotInList End Sub Private Sub cboPartNumber_Exit(Cancel As Integer) Forms![fManufacturing]!txtPartNumber.Requery End Sub Is the record dirty at the time? Not sure, please explain. Is the form bound to a query that is not updatable? It's recordsource is a table. Is there any other code running at the time? Have you used OpenTrans in code? No Is there any other form or process open at the same time, referring to the same records? No "PHisaw" wrote in message ... Allen, Thanks for the reply. I use the mouse to highlight all the records I want to delete down the left side of column and then use the "X" delete shortcut button at the top of the screen. This is the first time I've ran across this error. Should I use something else when there is a need to delete? Pam "Allen Browne" wrote: The problem might be the event you chose to delete the record. Access uses a transaction around its own deletions and edits. If something like this is already in progress, your deletion clashes with it. Since you are in datasheet view, you are not using a command button. If you are using something like the KeyDown event, be sure to destroy the keystoke first, e.g.: Me.KeyCode = 0 Then test if the form is dirty, and if so undo it: If Me.Dirty Then Me.Dirty = False Then check that you are not at a new record, and delete: If Not Me.NewRecord Then RunCommand acCmdDeleteRecord "PHisaw" wrote in message ... Can someone please explain this new message I'm getting when I delete records from a subform in datasheet view? Thanks in advance, Pam |
Thread Tools | |
Display Modes | |
|
|