Lock Field After Update

R

Randy

Hello...
Ok...I have a checkbox [Active] which when checked automatically enters the
current date/time into another control/field [Date_On]. What I am looking for
is a way to lock the field [Date_On] when the [Active] checkbox is checked
and/or the record is saved.

Any ideas would be greatly appreciated. I thank you in advacnce for your
time.
 
O

Ofer Cohen

On the AfterUpdate event of the check box run the code

If Nz(Me.[Active],False) = True Then
Me.[Date_On]=Now()
Me.[Date_On].Locked = True
Else
Me.[Date_On].Locked=False
End If

If you move between records, then use the OnCurrent event of the form to
lock the Date_On field

Me.[Date_On].Locked = Nz(Me.[Active],False)
 
R

Randy

You are a ROCK STAR! Worked like a charm! Thank you so very much! Have a
great day!
--
Randy Street
Rancho Cucamonga, CA


Ofer Cohen said:
On the AfterUpdate event of the check box run the code

If Nz(Me.[Active],False) = True Then
Me.[Date_On]=Now()
Me.[Date_On].Locked = True
Else
Me.[Date_On].Locked=False
End If

If you move between records, then use the OnCurrent event of the form to
lock the Date_On field

Me.[Date_On].Locked = Nz(Me.[Active],False)


--
Good Luck
BS"D


Randy said:
Hello...
Ok...I have a checkbox [Active] which when checked automatically enters the
current date/time into another control/field [Date_On]. What I am looking for
is a way to lock the field [Date_On] when the [Active] checkbox is checked
and/or the record is saved.

Any ideas would be greatly appreciated. I thank you in advacnce for your
time.
 
Top