detecting change in a field

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
 
K

KARL DEWEY

You can use an event or macro triggered on status field change to set status
date field to =Now().
 
F

fredg

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().
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top