Thom
Aug 16th, 2000, 09:57 PM
After a little more research-the problem only seems to be happening when I create a NEW test and while EDITING a questions I change my mind & hit the UNDO it deletes! Here's the code:
First the EDIT record code:
Case cmdEdit '-- edit the current record
editStatus = nowEditing
With rs1
vMyBookmark = .Bookmark
Me.Caption = "Editing this Item"
End With
This sets the bookmark to the CURRENT record..
Then, I hit the UNDO cmdbutton:
Case cmdUndo '-- undo changes to the current record
With rs1
If editStatus = nowEditing Then
.Bookmark = vMyBookmark
End If
.CancelUpdate [HERE's where the DELETE occurs!]
If (Len(vMyBookmark)) Then
.Bookmark = vMyBookmark
Else
If .RecordCount > 0 Then
.MoveFirst
End If
End If
End With
editStatus = nowStatic
Now this works just fine if I ADD & then Undo, but NOT if I edit!! Any ideas why?? I'm using ADO 2.1, but the PC has MDAC 2.5 installed in order to put SP4 for Visual Studio on it-could that be part of the problem??
First the EDIT record code:
Case cmdEdit '-- edit the current record
editStatus = nowEditing
With rs1
vMyBookmark = .Bookmark
Me.Caption = "Editing this Item"
End With
This sets the bookmark to the CURRENT record..
Then, I hit the UNDO cmdbutton:
Case cmdUndo '-- undo changes to the current record
With rs1
If editStatus = nowEditing Then
.Bookmark = vMyBookmark
End If
.CancelUpdate [HERE's where the DELETE occurs!]
If (Len(vMyBookmark)) Then
.Bookmark = vMyBookmark
Else
If .RecordCount > 0 Then
.MoveFirst
End If
End If
End With
editStatus = nowStatic
Now this works just fine if I ADD & then Undo, but NOT if I edit!! Any ideas why?? I'm using ADO 2.1, but the PC has MDAC 2.5 installed in order to put SP4 for Visual Studio on it-could that be part of the problem??