Prevent inadvertant updates to a combo box (1 Viewer)

Wulf13

Registered User.
Local time
Today, 03:30
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???
 

bonekrusher

Registered User.
Local time
Today, 02:30
Joined
Nov 19, 2005
Messages
266
On the on change event for the combo box, add this:
MsgBox ("Are you sure you want to change this?"), vbYesNo
 
R

Rich

Guest
Use the BeforeUpdate event of the control combined with Cancel=True if you don't want the changes
 

Users who are viewing this thread

Top Bottom