By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,854 Members | 1,871 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,854 IT Pros & Developers. It's quick & easy.

dirty vs change vs beforeupdate

P: n/a
I'm sure this is a simple one.

I have a combo box that, when its data is changed, will trigger a second
form to open for input. If the operator declines input, I want the combo
box to return to its original value. The on change event is wrong for
this, since the new data has already been saved. As I undertand it, the
beforeupdate event won't work either, since it applied to the entire form.
Would ondirty be the right event to use?

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On Mon, 21 Feb 2005 15:37:51 GMT, bob bob via AccessMonster.com
<fo***@AccessMonster.com> wrote:
I have a combo box that, when its data is changed, will trigger a second
form to open for input. If the operator declines input, I want the combo
box to return to its original value. The on change event is wrong for
this, since the new data has already been saved. As I undertand it, the
beforeupdate event won't work either, since it applied to the entire
form.
Would ondirty be the right event to use?


Much of what you need to do with Access controls can be done with
BeforeUpdate and AfterUpdate. I'm not sure how you intend the "operator
declines input" thing to happen (where are they declining input?), but if
you want the combobox value change to be 'cancelable', put your code in
the BeforeUpdate event. You then set Cancel to True if you want to undo
the change.

Are you trying to handle a 'Not In List' message? There is a specific
event just for that.
Darryl Kerkeslager
Nov 13 '05 #2

P: n/a
What happens is that a form opens and asks for additional information.
There are several items of data that need to be supplied. If not, the
change to the combo box is rejected.

--
Message posted via http://www.accessmonster.com
Nov 13 '05 #3

P: n/a
On Mon, 21 Feb 2005 18:51:34 GMT, bob bob via AccessMonster.com
<fo***@AccessMonster.com> wrote:
What happens is that a form opens and asks for additional information.
There are several items of data that need to be supplied. If not, the
change to the combo box is rejected.


Then use BeforeUpdate. Open your form, and post back some sort of
returned value for 'okay' or 'cancel' (various ways to do this). the
changes are unacceptable, then

Cancel=True

in your BeforeUpdate code, which will cancel the update.
Darryl Kerkeslager
Nov 13 '05 #4

P: n/a
Bri
Bob,

There is a BeforeUpdate event for each control as well as for the Form.
You can put your code on the BeforeUpdate for the first Combo.

--
Bri

bob bob via AccessMonster.com wrote:
I'm sure this is a simple one.

I have a combo box that, when its data is changed, will trigger a second
form to open for input. If the operator declines input, I want the combo
box to return to its original value. The on change event is wrong for
this, since the new data has already been saved. As I undertand it, the
beforeupdate event won't work either, since it applied to the entire form.
Would ondirty be the right event to use?

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.