472,334 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,334 software developers and data experts.

dirty vs change vs beforeupdate

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
4 11142
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Rey | last post by:
Howdy all. Appreciate your help with several problems I'm having: I'm trying to determine if the Visit subform (subformVisits) has a new record...
4
by: William Wisnieski | last post by:
Hello Everyone, Access 2000 I have a form with multiple pages on it. There is one text field on the third page of the form that I need the...
6
by: P | last post by:
Hi, I have a form with several controls. One of them is initialized through VB in frm_current. I am using the frm_beforeupdate event to prompt...
1
by: Ray | last post by:
I have a subform which takes one of its fields from the main form, namely the YearLevel which is from 1 to 8. There is also another field which...
2
by: Salad | last post by:
A97. I have a command button to save and exit. I had the code If Me.Dirty Then Docmd.RunCommand acCmdSaveRecord ...more code endif I was...
0
by: Deano | last post by:
My beforeupdate event on the main form fires when a change has been made and the record has not been saved (2 variables are used to track this). ...
9
by: Susan Bricker | last post by:
I am currently using the OnDirty event of a Form to detect whether any fields have been modified. I set a boolean variable. Then, if the Close...
6
by: tlyczko | last post by:
I have a BeforeUpdate where I need to ensure that no matter what, the first four fields on the form (one text box, 3 combo box lists) have data...
8
by: evn678 | last post by:
Hello all, I am trying to handle a scenario where a user clicks the 'X' close control on a form window border. I want to force the user to use...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.