Don't show message box

SueBK

Registered User.
Local time
Tomorrow, 04:35
Joined
Apr 2, 2009
Messages
197
On my form I have a "delete this record" button, which I set up using the command button wizard. If the user clicks it, and then goes "Opps" and clicks "No - actually I don't want to delete this record" (or whatever the standard message is) another message box pops up saying "The DoMenuItem action was cancelled".

I want the first "Are you SURE?" message box (always good to have an opt out option), but I'd like the cancelled command box to vamoose. Is this possible?
 
Yes it is possible. You will need to use your own error handling to trap the error.


Something like:
Code:
If Err.Num <> 2501 Then 
   MsgBox "Error: " & Err.Num & " - " & Err.Description
End If
*** Air code - not tested - but should be close

Check the Help file for more information ion error handling.


Note: I do not actual delete records, I only set a deleted flag. I filter out the "deleted" records so that the user do not see them.
 
Thank you HiTech. <sigh> I think. Your off the cuff comment about not deleting records has set off a train of thought in the design team. And that train of thought is likely to translate into several days work.
 

Users who are viewing this thread

Back
Top Bottom