Appending field change of status to a history table

Appending field change of status to a history table

am 14.11.2007 02:24:01 von unknown

Post removed (X-No-Archive: yes)

Re: Appending field change of status to a history table

am 14.11.2007 13:36:45 von Allen Browne

Here's an example of how to track each edit, insert, and delete:
Audit Trail - Log changes at the record level
at:
http://allenbrowne.com/AppAudit.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"McQ" wrote in message
news:o8hkj3d2vpqrqpmsdn74bdlulet6tpbv1k@4ax.com...
> Access 2003
>
> I need to keep a history of the change of status of two fields to a
> history table. My problem is that I keep appending all of the records
> in a table instead of the fields I want in the "current record". The
> form and fields I want to keep a history of change is:
>
> Form: [RMA]
> Field: [RmaRecId]
> Field: [RmaStatus]
> Field: [RmaStatusDate]
>
> When a RMA comes in a record will be generated with a [RmaRecID].
> The [RmaStatus] will be "Received" and the [RmaStatusDate] will be the
> date of arrival. When the rma goes to the Techs they will bring up
> the record and change the [RmaStatus] to "In Process" and change the
> [RmaStatusDate] to the date they changed the [RmaStatus].
>
> The History table has:
>
> Field: [HisRmaRecId]
> Field: [HisRmaStatus]
> Field: [HisRmaStatusDate]
>
> I'm trying to append of "the current record":
>
> [RmaRecId]->[HisRmaRecId]
> [RmaStatus]->[HisRmaStatus]
> [RmaStatusDate]->[HisRmaStatusDate]
>
> The Status and Date could change several times before final
> disposition and that's what I want a history of but I can't seem to
> keep from appending all of the RMA status and date records to the
> history table instead of just the current record.
>
> Help would be appreciated.
>
> Rick

Re: Appending field change of status to a history table

am 15.11.2007 04:33:21 von unknown

Post removed (X-No-Archive: yes)

Re: Appending field change of status to a history table

am 15.11.2007 05:02:18 von Allen Browne

Both: it records the date and time of the new record, the name of the user
who saved it, and the value of the fields at the time it was saved.

It's easy enough to modify if you don't want to record when the new record
was created.

(This was originally written to keep an auditor happy.)

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"McQ" wrote in message
news:gkenj317fb4jpq10gvgpjpsc41mikkguq1@4ax.com...
>
> Thank you. I've read the code several times but I'm still not quite
> sure what is happening when a new record is saved. Is it saving the
> complete record or just making an entry that a new record was added to
> the table and by whom?
>
> Rick
>
>
>
>
> "Allen Browne" wrote:
>
>>Here's an example of how to track each edit, insert, and delete:
>> Audit Trail - Log changes at the record level
>>at:
>> http://allenbrowne.com/AppAudit.html
>>
>>"McQ" wrote in message
>>news:o8hkj3d2vpqrqpmsdn74bdlulet6tpbv1k@4ax.com...
>>> Access 2003
>>>
>>> I need to keep a history of the change of status of two fields to a
>>> history table. My problem is that I keep appending all of the records
>>> in a table instead of the fields I want in the "current record". The
>>> form and fields I want to keep a history of change is:
>>>
>>> Form: [RMA]
>>> Field: [RmaRecId]
>>> Field: [RmaStatus]
>>> Field: [RmaStatusDate]
>>>
>>> When a RMA comes in a record will be generated with a [RmaRecID].
>>> The [RmaStatus] will be "Received" and the [RmaStatusDate] will be the
>>> date of arrival. When the rma goes to the Techs they will bring up
>>> the record and change the [RmaStatus] to "In Process" and change the
>>> [RmaStatusDate] to the date they changed the [RmaStatus].
>>>
>>> The History table has:
>>>
>>> Field: [HisRmaRecId]
>>> Field: [HisRmaStatus]
>>> Field: [HisRmaStatusDate]
>>>
>>> I'm trying to append of "the current record":
>>>
>>> [RmaRecId]->[HisRmaRecId]
>>> [RmaStatus]->[HisRmaStatus]
>>> [RmaStatusDate]->[HisRmaStatusDate]
>>>
>>> The Status and Date could change several times before final
>>> disposition and that's what I want a history of but I can't seem to
>>> keep from appending all of the RMA status and date records to the
>>> history table instead of just the current record.
>>>
>>> Help would be appreciated.
>>>
>>> Rick