ThunderBolt
Registered User.
- Local time
- Today, 16:33
- Joined
- Apr 29, 2003
- Messages
- 25
This is simple, but it has stumped me today. I am adding code to the onclick event on a button, on a form. The button needs to delete the current record and then display the record prior to that on the screen. I would like to have a "are you sure" option and so far i have managed to complie the following code:
Dim intResult As Integer
intResult = MsgBox("Are You Sure You Want To Delete This Record?", vbYesNo)
If intResult = vbYes Then
???
Else
Cancel = True
End If
Exit Sub
The ??? signify the where the code for the delete current record record command should appear. I would be greatful for someone to give me a hint on that please.
I would also appreciate any help on how to revert back to the last record when a record has been deleted i.e the record has been wiped and instead of blank boxes on the form where the record used to be, the previos record now appears.
Thankyou,
Regards Thunderbolt

Dim intResult As Integer
intResult = MsgBox("Are You Sure You Want To Delete This Record?", vbYesNo)
If intResult = vbYes Then
???
Else
Cancel = True
End If
Exit Sub
The ??? signify the where the code for the delete current record record command should appear. I would be greatful for someone to give me a hint on that please.
I would also appreciate any help on how to revert back to the last record when a record has been deleted i.e the record has been wiped and instead of blank boxes on the form where the record used to be, the previos record now appears.
Thankyou,
Regards Thunderbolt