Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / May 2008

Tip: Looking for answers? Try searching our database.

date of last data change

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Silvio - 25 May 2008 16:01 GMT
I have a table with 3 fields [DateIn] [Rates] and [LastModified]

DateIn default value it is set to Now() in the table

When a user enters a new record he is required to enter a Rate only. The
system will populate the filed DateIn automatically and at this stage the
LastModified field NOT have any value since the initial [Rate] has not been
modified yet.

Then, the user can open up a form and update the [Rate], if needed. This is
where I need to start to keep track of the DateModified only after the
initial Rate changes not the initial setup.

I tried to set me.LastModified = Now() in before update, after update, on
change, on dirty and nothing seem to work as I expect meaning the system
enter the LastModified date even on the initial entry (the same form is used
to enter new records). Any suggestion?
Rick Brandt - 25 May 2008 16:04 GMT
> I have a table with 3 fields [DateIn] [Rates] and [LastModified]
>
[quoted text clipped - 13 lines]
> meaning the system enter the LastModified date even on the initial
> entry (the same form is used to enter new records). Any suggestion?

BeforeUpdate

If Not Me.NewRecord Then
   Me.LastModified = Now
End If

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Silvio - 25 May 2008 18:00 GMT
Works great. Thank you!

> > I have a table with 3 fields [DateIn] [Rates] and [LastModified]
> >
[quoted text clipped - 19 lines]
>     Me.LastModified = Now
> End If
Jan Baird - 27 May 2008 20:51 GMT
Jan Baird is out of the country until September 20.   Every effort will be
made to respond to messages, but please be patient.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.