Populating a fileld depending on the value of another ?

ciskid

Registered User.
Local time
Today, 15:16
Joined
Jul 24, 2006
Messages
30
Hi

I have an after update even on a field on a form.


If the user selects Clsoed in obe filed it autoupdatwes another filed with the date and time of closure as follows:-

Private Sub OPENCLOSED_AfterUpdate()

If OPENCLOSED.Value = "Closed" Then
DATECLOSED.Value = Now()
End If
End Sub

However I need another statement (else), so that if he changes the status back to open then the DATECOSED FIELD is cleared.

Does this make sense.

I may have many more questions as Im just getting back into access after a 10 year break :eek:

Thanks

Jimmy
 
Ok all sorted

Private Sub OPENCLOSED_AfterUpdate()

If OPENCLOSED.Value = "Closed" Then
DATECLOSED.Value = Now()
Else: DATECLOSED.Value = ""

End If

End Sub


Cheers

Jimmy
 

Users who are viewing this thread

Back
Top Bottom