M
melbourno
I need to be able to lock Detailed Description field in a form when
the field contains
data. Obviously when creating a new record I need to be able to enter
data in
the field. I can lock the whole record and I can lock the field at
the
moment but it then does not allow me to enter data in new records
I tried the below codes:
Private Sub Detailed_Description_AfterUpdate()
Me.Detailed_Description = Now & ", " & Me.Detailed_Description
Me.Detailed_Description.Locked = Not IsNull(Me.Detailed_Description)
End Sub
And I also tried:
Private Sub Detailed_Description_AfterUpdate()
Dim blnUnlockControl
blnUnlockControl = Not Me.NewRecord
Me.Detailed_Description.Locked = bnlUnlockControl
Me.Detailed_Description = Now & ", " & Me.Detailed_Description
Me.Detailed_Description.Locked = Not IsNull(Me.Detailed_Description)
End Sub
And I tried:
Private Sub Detailed_Description_AfterUpdate()
If IsNull(Detailed_Description) Then
Me.AllowEdits = True
Else
Me.AllowEdits = False
End If
Me.Detailed_Description = Now & ", " & Me.Detailed_Description
End Sub
None of them worked....Can someone tell me please what I'm doing wrong
here
Thanks,
Mark
the field contains
data. Obviously when creating a new record I need to be able to enter
data in
the field. I can lock the whole record and I can lock the field at
the
moment but it then does not allow me to enter data in new records
I tried the below codes:
Private Sub Detailed_Description_AfterUpdate()
Me.Detailed_Description = Now & ", " & Me.Detailed_Description
Me.Detailed_Description.Locked = Not IsNull(Me.Detailed_Description)
End Sub
And I also tried:
Private Sub Detailed_Description_AfterUpdate()
Dim blnUnlockControl
blnUnlockControl = Not Me.NewRecord
Me.Detailed_Description.Locked = bnlUnlockControl
Me.Detailed_Description = Now & ", " & Me.Detailed_Description
Me.Detailed_Description.Locked = Not IsNull(Me.Detailed_Description)
End Sub
And I tried:
Private Sub Detailed_Description_AfterUpdate()
If IsNull(Detailed_Description) Then
Me.AllowEdits = True
Else
Me.AllowEdits = False
End If
Me.Detailed_Description = Now & ", " & Me.Detailed_Description
End Sub
None of them worked....Can someone tell me please what I'm doing wrong
here
Thanks,
Mark