Update a date field after updating another field.

G

Guest

Ok I have 2 fields that I need to work with. One being a "Status" field and
the other being an "ending date" field. What I'm going for is to update teh
"ending date" field with the current date when the "Status" field is changed
to 'Closed'.

The "Status" field is contents from another table being named "Status". The
"Ending Date" field is contained in my main table "Changes"

Also I'm working with access 2003, and an mdb file (if that helps at all)
 
G

Guest

Tim,

In the AfterUpdate event of the Status field:

If Me![Status] = "Closed" Then
Me![EndingDate] = Date()
End If

If the underlying Status field is actually numeric, change "Closed" to the
appropriate number associated with the text "Closed", without the quotes,
e.g.:

If Me![Status] = 2 Then
Me![EndingDate] = Date()
End If

Sprinks
 

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