Auto update for Date

V

Very Basic User

Hello, This is difficult for me to explain, but I'll try my best. I have a
form that is filled in to track project status. In the form I have severl
fields that need filled in. Two of these fields are "Status" and "Date
Completed" What I want to happen is... If I change status from in progress to
completed, the date I make that change is automatically entered into the date
completed field. The only trick is that I need it to not do it each time I
open the form to that record. In other words, the only time I want to
automatically enter the date is if the date field is at that point blank. If
the date compelted field is already entered, I don't want it to be changed
again. Any help would be appreciated!

Thank you,
John
 
J

julie

Very Basic User said:
Hello, This is difficult for me to explain, but I'll try my best. I have a
form that is filled in to track project status. In the form I have severl
fields that need filled in. Two of these fields are "Status" and "Date
Completed" What I want to happen is... If I change status from in progress
to
completed, the date I make that change is automatically entered into the
date
completed field. The only trick is that I need it to not do it each time I
open the form to that record. In other words, the only time I want to
automatically enter the date is if the date field is at that point blank.
If
the date compelted field is already entered, I don't want it to be changed
again. Any help would be appreciated!

Thank you,
John
 
V

Very Basic User

I found a start in here... posted below, the only problem is that it does not
tie to only do something if the Date completed is Null. So even if I mark
completed and the date fills, when I change from to completed to cancelled or
back, the date re-updates. I want to keep the original date marked. I'm
trying to understand where I would add something like...
If ME![Status]= "Completed" and [actual completion date]=null
Then Me![Actual completion date] = Now()
if actual completion date is not null, do nothing

THIS PORTION WORKS PARTIALLY
Private Sub Status_AfterUpdate()
If Me![Status] = "Completed" Then
Me![Actual completion date] = Now()
End If
If Me![Status] = "Canceled" Then
Me![Actual completion date] = Now()
End If
End Sub
--
Thank you for your time!
John


 

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