I have a subform which contains a field called Tbdesc, which is locked if the field is not null
Code below.
I want to add another criteria to this so that the field is unlocked if the user entered the original data.
So i am thinking it will be
Would this work ?
My form with this data contains the fields below.
tbJobID, tbusername, tbCommentdate, tbdesc.
Code below.
I want to add another criteria to this so that the field is unlocked if the user entered the original data.
Code:
If Nz(tbDesc, "") = "" Then
tbDesc.Locked = False
tbDesc.SetFocus
Else
tbDesc.Locked = True
End If
End If
So i am thinking it will be
Code:
If Nz(tbDesc, "") = "" Then
tbDesc.Locked = False
tbDesc.SetFocus
Else
[INDENT][INDENT]If tbusername = '" & Environ("UserName") & "' then
tbDesc.Locked = false
else
tbDesc.Locked = True
End If[/INDENT][/INDENT]
End If
Would this work ?
My form with this data contains the fields below.
tbJobID, tbusername, tbCommentdate, tbdesc.