Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2011-05-11
Medium Priority
Last Modified: 2012-06-27
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?  

Question by:AronMcD
LVL 58

Accepted Solution

Jim Dettman (Microsoft MVP/ EE MVE) earned 2000 total points
ID: 35737676

 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.


Author Comment

ID: 35737730
.OldValue works.  I should have thought of that.  Thanks JDettman!

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MS Outlook undoubtedly is the most widely used email client.Its user-friendliness, cost effectiveness, and availability with Microsoft Office Suite make it the most popular email application.  Its compatibility with Microsoft applications like Exch…
In this article, I will demonstrate that how to do a PST migration from Exchange Server to Office 365. This method allows importing one single PST, or multiple PST's at once.
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question