detecting change in a field

  • Thread starter Thread starter dosima
  • Start date Start date
D

dosima

Hi, i have a drop down box which shows the status of a customer. The status
of the customer can change from time to time. I would like to know if there
is a way of detecting when someone changes the status, such as the date when
the status was changed. Please could someone give me an idea.

otherwise i did think of adding a status date field, whereby when someone
changes the status, the status date field would be changed to the date its
changed. The only thing is that if someone changes the status, i want the
date to be automatically changed to todays date. If someone could also tell
me what coding i would need for this please.

Thank in advance
 
You can use an event or macro triggered on status field change to set status
date field to =Now().
 
Hi, i have a drop down box which shows the status of a customer. The status
of the customer can change from time to time. I would like to know if there
is a way of detecting when someone changes the status, such as the date when
the status was changed. Please could someone give me an idea.

otherwise i did think of adding a status date field, whereby when someone
changes the status, the status date field would be changed to the date its
changed. The only thing is that if someone changes the status, i want the
date to be automatically changed to todays date. If someone could also tell
me what coding i would need for this please.

Thank in advance

You only wish to show the last date the field was changed?
Add a StatusDateChange field to the table, DateTime datatype.

Code the [CustomerStatus] control's AfterUpdate event:

If Me.[CustomerStatus] = [CustomerStatus].OldValue then
Else
Me.[StatusDateChange] = Now()
End If

The current date and time will be saved. If you only wish the date,
use =Date instead of = Now().
 
Back
Top