Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-access > #10965

Re: Auto Update Column on Record Update

From "Ron Paii" <None@none.com>
Newsgroups comp.databases.ms-access
Subject Re: Auto Update Column on Record Update
Date 2015-07-27 07:47 -0500
Organization A noiseless patient Spider
Message-ID <mp5963$nud$1@dont-email.me> (permalink)
References <b56e5c5b-6da2-4b19-a012-2267f4160690@googlegroups.com>

Show all headers | View raw



<mflynn@scu.edu> wrote in message 
news:b56e5c5b-6da2-4b19-a012-2267f4160690@googlegroups.com...
> I have several databases where most of the data originates in other 
> databases and is loaded into my databases from an Excel spreadsheet.  I 
> usually add a column to my tables named LoadDate that is a Date/Time type 
> and I set the default value to =Now(). I never explicity load the LoadDate 
> column, I let the default value take care of it.  This is handy for 
> tracking issues and backing out loads that had an error.
>
> Is there an way to add an UpdateDate column that does the same thing when 
> the record is changed/updated?  Is there an event I could write some VBA 
> for?  Are there some table otpions that would accomplish this?
>
> In individual forms I have code that puts the current date and time into a 
> UpdateDate column if the record is changed, I was just wondering if there 
> was a way to achieve this in one place instead of having to write code in 
> every place the record might be updated.
>
> Any help gratefully accepted,
>
> Mike
>
>

You could add a data macro to the table in the BE, with the added benefit of 
updating no matter how the record was updated. 

Back to comp.databases.ms-access | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Auto Update Column on Record Update mflynn@scu.edu - 2015-07-23 11:47 -0700
  Re: Auto Update Column on Record Update Patrick Finucane <patrickfinucanetx@gmail.com> - 2015-07-24 06:09 -0700
    Re: Auto Update Column on Record Update Ulrich Möller <knobbi38@arcor.de> - 2015-07-24 22:00 +0200
  Re: Auto Update Column on Record Update "Ron Paii" <None@none.com> - 2015-07-27 07:47 -0500
    Re: Auto Update Column on Record Update mflynn@scu.edu - 2015-07-28 09:15 -0700
      Re: Auto Update Column on Record Update Ulrich Möller <knobbi38@arcor.de> - 2015-07-28 18:53 +0200
      Re: Auto Update Column on Record Update "Ron Paii" <None@none.com> - 2015-07-29 07:59 -0500
        Re: Auto Update Column on Record Update mflynn@scu.edu - 2015-07-30 09:16 -0700

csiph-web