|
|
Recording the date and time when a record is modified in Access
Recording the date and time when a record is modified in Access
Create a macro named LastModified and set its action and item
arguments as described in the following table: Action
Item Expression
SetValue [DateModified] Date()
SetValue [TimeModified] Time()
Set the BeforeUpdate property of the form to LastModified (the name of
the macro).
...................................................................................................................
It does not work for me and I am trying to work out why not.
I have DataModified and TimeModified as fields on my form. I have set
the BeforeUpdate property on the form.
I get an error message, "The object doesn't contain the Automation
object 's' ".
Don't know why not?
Cheers
|
|
0
|
|
|
|
Reply
|
duncanjx
|
12/3/2007 11:57:39 AM |
|
Two suggestions.
1. Don't use a macro. Instead use code like below in the BeforeUpdate event
which will do the same thing better.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Dirty = True Then
Me.DateModified = Now()
End If
End Sub
2. Store the date and time in just one field instead of two. You'll find it
much, much easier to compare dates and times that way. Now will insert both
the date and time into the DateModified field.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
"duncanjx@optusnet.com.au" wrote:
> Recording the date and time when a record is modified in Access
> Create a macro named LastModified and set its action and item
> arguments as described in the following table: Action
> Item Expression
> SetValue [DateModified] Date()
> SetValue [TimeModified] Time()
>
> Set the BeforeUpdate property of the form to LastModified (the name of
> the macro).
> ...................................................................................................................
> It does not work for me and I am trying to work out why not.
>
> I have DataModified and TimeModified as fields on my form. I have set
> the BeforeUpdate property on the form.
>
> I get an error message, "The object doesn't contain the Automation
> object 's' ".
>
> Don't know why not?
>
> Cheers
|
|
1
|
|
|
|
Reply
|
Utf
|
12/3/2007 2:28:01 PM
|
|
On Dec 4, 12:28 am, Jerry Whittle
<JerryWhit...@discussions.microsoft.com> wrote:
> Two suggestions.
>
> 1. Don't use a macro. Instead use code like below in the BeforeUpdate event
> which will do the same thing better.
>
> Private Sub Form_BeforeUpdate(Cancel As Integer)
> If Me.Dirty = True Then
> Me.DateModified = Now()
> End If
> End Sub
>
> 2. Store the date and time in just one field instead of two. You'll find it
> much, much easier to compare dates and times that way. Now will insert both
> the date and time into the DateModified field.
> --
> Jerry Whittle, Microsoft Access MVP
> Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
>
>
>
> "dunca...@optusnet.com.au" wrote:
> > Recording the date and time when a record is modified in Access
> > Create a macro named LastModified and set its action and item
> > arguments as described in the following table: Action
> > Item Expression
> > SetValue [DateModified] Date()
> > SetValue [TimeModified] Time()
>
> > Set the BeforeUpdate property of the form to LastModified (the name of
> > the macro).
> > ...........................................................................-........................................
> > It does not work for me and I am trying to work out why not.
>
> > I have DataModified and TimeModified as fields on my form. I have set
> > the BeforeUpdate property on the form.
>
> > I get an error message, "The object doesn't contain the Automation
> > object 's' ".
>
> > Don't know why not?
>
> > Cheers- Hide quoted text -
>
> - Show quoted text -
______________________________________________________________________________________________
Thanks for the reply.
I did as suggested. I built the code but the DateModified Field does
not alter or change when I change other fields, save, move to next
record and come back???????????
Still not sure.....
|
|
0
|
|
|
|
Reply
|
duncanjx
|
12/3/2007 9:18:35 PM
|
|
|
2 Replies
1182 Views
(page loaded in 0.089 seconds)
Similiar Articles: Recording the date and time when a record is modified in Access ...Recording the date and time when a record is modified in Access Create a macro named LastModified and set its action and item arguments as described i... I need to store the date a record was created, automatically ...Recording the date and time when a record is modified in Access ... I need to store the date a record was created, automatically ... Store the date and time when a record ... How do I save the date a record was last modified in Access 2003 ...Last modified Date for an Access file DataBase ... Recording the date and time when a record is modified in Access ... Support / Access / Access 2003 ... How do I store which user modified a record in Access 2007 ...Recording the date and time when a record is modified in Access ..... date and time when a record is modified in Access ... Store the date and time when a record is ... How to unconcatenate a record in Access - microsoft.public.access ...Recording the date and time when a record is modified in Access ... How to unconcatenate a record in Access - microsoft.public.access ... Recording the date and time when ... Access Database Modified Date - microsoft.public.access ...Recording the date and time when a record is modified in Access ... Recording the date and time when a record is modified in Access database.itags.org: Microsoft Access ... Get the date for the latest record ? - microsoft.public.access ...Recording the date and time when a record is modified in Access ... Get the date for the latest record ? - microsoft.public.access ... Recording the date and time when a ... How to Requery a form without losing the current record ...Recording the date and time when a record is modified in Access ... How to Requery a form without losing the current record ... How do I save the ... Find Modified Date of a Table - microsoft.public.access ...Recording the date and time when a record is modified in Access ... Recording the date and time when a record is modified in Access Create a ... To record the date and ... Display Database Modified Date on form - microsoft.public.access ...Recording the date and time when a record is modified in Access ... Show All ... form for a table containing customer data. At the bottom of the form, you can see the date ... Recording the date and time when a record is modified in Access ...Applies to Microsoft Office Access 2003 Microsoft Access 2002 When you use a form to edit records, you can add a date and time stamp to a record by attaching a macro ... Store the date and time when a record is modified - Access ...... used to modify a record, the macro stores the date and time ... Support / Access / Access ... To record the date and time that the records in a table are modified, you must ... Recording the date and time when a record is modified in Access ...Recording the date and time when a record is modified in Access Create a macro named LastModified and set its action and item arguments as described i... Recording the date and time when a record is modified in Accessdatabase.itags.org: Microsoft Access question: Recording the date and time when a record is modified in Access, created at:Tue, 03 Jun 2008 23:14:00 GMT with 518 ... Recording the date and time when a record is modified in Access ...Microsoft Access: When you use a form to edit records, you can add a date and time stamp to a record by attaching a macro to the BeforeUpdate form property, or by ... 7/17/2012 8:45:44 AM
|
|
|
|
|
|
|
|
|