• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 664
  • Last Modified:

MS Access Forms How to detect if data in field has changed

Is there a way to check to see if the value of a combo box or text box has changed?  I have placed my code in the AfterUpdate() event of a control but how can I be sure the user actually changed the data?  For example the user may click on the combo box and actually choose the same selection that it was originally.  In this case I wouldn't want to do anything.  Is there an event I can use that is only trigged if the data actually changes?  

1 Solution
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:

 You shouldn't be in AfterUpdate() if it hasn't changed, but if you want to be sure, look at the .OldValue property, which is the original data that was in the control when the record became current.

AronMcDAuthor Commented:
.OldValue works.  I should have thought of that.  Thanks JDettman!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now