Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 12th, 2008, 02:46 PM
Registered User
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do I check if a cell content has changed

ALl you experts...

I am trying to find a way to have a date in a cell change based on when the content in any cells in that row have changed.

As an example...
A1 = date to be changed
A2 - A10 = Various text and formulas

If any of the information in A2 - A10 changes then the date in A1 should be update automatically. This should also occur for every row.

Al

 
Old August 12th, 2008, 03:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

On each field's AFTER UPDATE event, just set the field in A1 to equal the function Date() if you don't need time or the function Now() if you DO need the date AND the time. For example,

Me.A1 = Date()

or

Me.A1 = Now()


Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
 
Old August 13th, 2008, 07:46 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

To get this started, you can also indicate a default value for A1 in your table design as Date() or Time() as well. This will tell you when the record was created.

Usually you would have DateCreated, WhoCreated, DateModified, WhoModified fields to keep track of this info.

mmcdonal

Look it up at: http://wrox.books24x7.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel VBA Check When Cell Has Changed tonyrosen Excel VBA 13 March 24th, 2015 05:15 PM
How to check whether page data has changed webmahesh JSP Basics 0 December 12th, 2007 04:38 AM
if the cell content is a part of another cell cont sriramus Excel VBA 1 November 15th, 2005 10:20 AM
How do I get the CHANGED value in a datagrid cell? Ron Howerton VB.NET 2002/2003 Basics 2 December 23rd, 2004 10:51 AM
Datagrid cell content value sinba Beginning VB 6 1 August 24th, 2004 01:58 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.