Slab_Rankle
Registered User.
- Local time
- Today, 19:24
- Joined
- Aug 10, 2011
- Messages
- 36
Hey guys,
I currently have a Note box on one of my subforms that locks after something has been entered and the user has clicked out of the box. Now, this worked at first, but one user has been trying to copy and paste information from some of the other tabs and when she leaves the current tab the box locks and she can't enter any information. Now, the code I currently have is as follows:
Private Sub Form_AfterUpdate()
If IsNull(Me.Narrative) Then
Me.Narrative.Locked = False
Else
Me.Narrative.Locked = True
End If
End Sub
Private Sub Form_Current()
If IsNull(Me.Narrative) Then
Me.Narrative.Locked = False
Else
Me.Narrative.Locked = True
End If
End Sub
How would I change this so that when a button is clicked the box becomes locked manually? Although it kind of defeats the purpose of locking a box so no one can edit it, it's something I've been asked to put in. Unless there's another option does anyone have any ideas? Any help would be ace
.
I currently have a Note box on one of my subforms that locks after something has been entered and the user has clicked out of the box. Now, this worked at first, but one user has been trying to copy and paste information from some of the other tabs and when she leaves the current tab the box locks and she can't enter any information. Now, the code I currently have is as follows:
Private Sub Form_AfterUpdate()
If IsNull(Me.Narrative) Then
Me.Narrative.Locked = False
Else
Me.Narrative.Locked = True
End If
End Sub
Private Sub Form_Current()
If IsNull(Me.Narrative) Then
Me.Narrative.Locked = False
Else
Me.Narrative.Locked = True
End If
End Sub
How would I change this so that when a button is clicked the box becomes locked manually? Although it kind of defeats the purpose of locking a box so no one can edit it, it's something I've been asked to put in. Unless there's another option does anyone have any ideas? Any help would be ace