Prevent inadvertant updates to a combo box

Wulf13

Registered User.
Local time
Today, 10:44
Joined
Jul 6, 2004
Messages
85
I have a combo box in a form that I want to prevent "unwanted" changes to this comb box.

I'm trying to find a way that if someone changes a combobox, it prompts them "are you sure you want to change this?"

If the answer is yes then it lets them change it, but if the answer is no it returns it to the previous value.

I know how to use a Msgbox and return a "yes" or "no" value but how do I programaticatically do the rest???
 
On the on change event for the combo box, add this:
MsgBox ("Are you sure you want to change this?"), vbYesNo
 
Use the BeforeUpdate event of the control combined with Cancel=True if you don't want the changes
 

Users who are viewing this thread

Back
Top Bottom