Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Coding a msg box to verify user's delete action, etc.

Status
Not open for further replies.

allis

Technical User
Oct 16, 2002
11
0
0
US
I have created a program, with a form where the user can view the records in a database, add, delete, search, update, etc.

When they push the delete button, I have a message box come up asking if they really want to delete that record, to prevent accidental deletion.

How do I code this box so that when they press "No" - it does NOT delete, and when they press "Yes" it DOES delete?


Thanks
 
if ure just using a standard messagebox(msgbox):-

If MsgBox("Delete?", vbYesNo, "Delete Me?") = vbYes Then
'delete record
Else
'dont delete record
End If

good luck

If somethings hard to do, its not worth doing - Homer Simpson
------------------------------------------------------------------------
A General Guide To Excel in VB FAQ222-3383
The Great Date Debate Thread222-368305
File Formats Galore @ or
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top