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

How to undo any uncommitted changes

P: 3
Hello all,
I have a DB that allows a user to choose fruit, also they have to choose a beginning date to search the table and also a fruit. Then in a subform they can put in details for the fruit. Like if they choose grapes then in the subform they can choose red grapes/green grapes/wine grapes/ ect.. But if they try to choose red grapes in the subform with out chooseing grapes, I am having the ap throw an error telling them that they have to put in a fruit and I set the focus in the fruit field. But the choice of red grapes and the location code of the grapes is still displaying in the sub-frm fields.

I want to undo the entry into the cboBox and the txt field. How do I roll that back? I have tried me.cancel = true and a few other things, but they are not working. I could just reset the controls, but this doesn't seem like a very good option. Thoughts?
Cheers,
tebule
Dec 14 '06 #1
Share this Question
Share on Google+
1 Reply


MMcCarthy
Expert Mod 10K+
P: 14,534
Hello all,
I have a DB that allows a user to choose fruit, also they have to choose a beginning date to search the table and also a fruit. Then in a subform they can put in details for the fruit. Like if they choose grapes then in the subform they can choose red grapes/green grapes/wine grapes/ ect.. But if they try to choose red grapes in the subform with out chooseing grapes, I am having the ap throw an error telling them that they have to put in a fruit and I set the focus in the fruit field. But the choice of red grapes and the location code of the grapes is still displaying in the sub-frm fields.

I want to undo the entry into the cboBox and the txt field. How do I roll that back? I have tried me.cancel = true and a few other things, but they are not working. I could just reset the controls, but this doesn't seem like a very good option. Thoughts?
Cheers,
tebule
Try ...

Expand|Select|Wrap|Line Numbers
  1. Me.cboBoxName = Null
  2. Me.txtFieldName = Null
  3. Me.cboBoxName.SetFocus
  4.  
Mary
Dec 15 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.