|
-
Jun 6th, 2007, 11:54 PM
#1
Thread Starter
Junior Member
[RESOLVED] Cancel Combobox Change
Basically have a combobox and on the Change event im bringing up a MsgBox asking whether I am sure I wish to change the value, which is fine. Just need some code to return the combo back to its previous value
cheers
Code:
If MsgBox("Status Change: Go ahead with changes?", vbYesNo + vbQuestion, "Status Change") = vbNo Then
//Here...... ''
End If
-
Jun 7th, 2007, 06:25 AM
#2
Addicted Member
Re: Cancel Combobox Change
 Originally Posted by terbs
Basically have a combobox and on the Change event im bringing up a MsgBox asking whether I am sure I wish to change the value, which is fine. Just need some code to return the combo back to its previous value
cheers
Code:
If MsgBox("Status Change: Go ahead with changes?", vbYesNo + vbQuestion, "Status Change") = vbNo Then
//Here...... ''
End If
you will need to write the previous value before the change
either using before update or on click.
you will then have the value after update, and your msg box decision will be able to write either value back to teh combo box.
if you fail to plan, you plan to fail
-
Jun 7th, 2007, 06:49 PM
#3
Thread Starter
Junior Member
Re: Cancel Combobox Change
yeah I had a play with this idea myself im just unsure how to execute it.
I declare a the variable "tempstatus" on the onClick event,
vb Code:
Dim tempstatus
tempstatus = me.cmbStatus.value
but when I call it on the onChange event it says variable not defined
-
Jun 7th, 2007, 06:57 PM
#4
Thread Starter
Junior Member
Re: Cancel Combobox Change
figured it out, just applied the value of the combo box to a hidden field on the GotFocus event..
cheers
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|