I have a code on current in a form, but it does do part of my request not the whole requested, I could not figure out why. Below is my code.
If ((Not IsNull(Me.PDNOTES) And Me.Combo43 <> "Y") And (Me.PDNOTES <> "" And Me.Combo43 <> "Y")) Or ((Not IsNull(Me.PDNOTES) And Me.PDRETURNED <> "Y") And (Me.PDNOTES <> "" And Me.PDRETURNED <> "Y")) Then
If stSecurity > 1 Then
Me.PDNOTES.Locked = False
Me.Command126.Enabled = False
Me.PDNOTES.Locked = True
Me.Command126.Enabled = True
I have a form that have field: Rejected (combo43), field : Returned (Returned), field: PDNotes (memo field), and a Button "add Additional Note" Both Rejected and Returned are combo box with "Y" or "N"
I also assigned users in different level. Level 1 users are limited entry. above Level 1 then has full entry.
what I want to do is in this form, I would like to do is:
for Level 1 Users:
a). if either Rejected or Returned is Null or "N" and PDNotes field is null then they can add note in the PDNotes field and the
Button "Add Additional Notes" will be gray out.
b). if either Rejected or Returned is Null or "N" and PDNotes field is not null then the PDNotes field should be lock and they have to
click the "Add additional Notes" button to add notes
For Level 2 or above users:
No matter the Rejected or Returned or PDNotes is null or not null , they can always enter in the PDNotes field and the "Add
Additional Notes should always gray out.
My code above only does part of them not all.
It does not work for Level 1 user is : they still can type in the PDNotes fields when there is Notes already there previously. It should be lock the PDnotes field but it does not.
it does not work for Level 2 User is : the "Add Additional Notes" button still enable not gray out.