D
dirtrhoads
I have a Delete Command Button on a form which does not appear to be working
properly.
I originally had a delete button macro created by the command button wizard
and it seemed to be functioning properly... from the form it would ask if you
want to delete the record permanently. If I chose yes, it would appear to
delete it, meaning that if I were to search for the record to verify it would
say that the record does not exist. Upon closing the form and viewing the
table, the record would not actually be deleted and would then be back on the
form when I would reopen it.
So, I browsed through the discussion board and found a suggestion on a
couple of posts and tried that as well creating the delete button in the code
builder using the following code:
Private Sub Command233_Click()
If Me.Dirty Then
Me.Undo
End If
If Not Me.NewRecord Then
RunCommand acCmdDeleteRecord
End If
End Sub
But, this does the same thing. It does not delete the record from the
primary table.
Can someone please provide a suggestion to how I can get this to work
properly?
Thank you,
Amy
properly.
I originally had a delete button macro created by the command button wizard
and it seemed to be functioning properly... from the form it would ask if you
want to delete the record permanently. If I chose yes, it would appear to
delete it, meaning that if I were to search for the record to verify it would
say that the record does not exist. Upon closing the form and viewing the
table, the record would not actually be deleted and would then be back on the
form when I would reopen it.
So, I browsed through the discussion board and found a suggestion on a
couple of posts and tried that as well creating the delete button in the code
builder using the following code:
Private Sub Command233_Click()
If Me.Dirty Then
Me.Undo
End If
If Not Me.NewRecord Then
RunCommand acCmdDeleteRecord
End If
End Sub
But, this does the same thing. It does not delete the record from the
primary table.
Can someone please provide a suggestion to how I can get this to work
properly?
Thank you,
Amy