How do I populate current date based on another fields output?

S

Selli

I am trying to automatically populate a date field only when a specific
"status" is chosen. i.e. if Status = "Closed" then Resolved Date = Date()
(current date). If status <> closed then Resolved date is null. This would
be a form filed.
 
T

Tom van Stiphout

On Mon, 21 Jul 2008 18:06:03 -0700, Selli

In the Status field's AfterUpdate event write:
if Me.Status = "Closed" then
Me.[Resolved Date] = Date()
else
Me.[Resolved Date] = Null
end if
(of course you need to double-check the control names)

-Tom.
Microsoft Access MVP
 

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