Locked property

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: shaggles (anonymous_at_discussions.microsoft.com)
Date: 07/19/04


Date: Mon, 19 Jul 2004 12:47:41 -0700

I am trying to set the Locked property of a comment field
based on the user id. I got the following code from vb
help in access but I get an error message saying the
object doesn't support this property or method. The field
I'm trying to lock are on a subform. Does that make a
difference? I put the code in the On Curent event of the
subform.
Private Sub Form_Current()
If Me!UserID = CurrentUser Then
Me!Response.Locked = False
Me!Sign_Off.Locked = False
Else
Me!Response.Locked = True
Me!Sign_Off.Locked = True
End If
End Sub



Relevant Pages

  • Re: way to LOCK a textbox after data goes in
    ... I tried to make the button invisibe right ... Private Sub btnEnd_Click ... hitting the End button again. ... toggle the .Locked property instead instead ...
    (comp.databases.ms-access)
  • Re: Protecting Fields
    ... In the Current event of the form, you could set the Locked property of the ... based on the NewRecord property of the form: ... Private Sub Form_Current ... rather than allenbrowne at mvps dot org. ...
    (microsoft.public.access.forms)
  • Re: dropdown arrow
    ... However, you CAN set the Locked property to YES, so that they ... Private Sub Form_Current ... the columns property starts counting from zero, ... Roger dot Carlson at Spectrum-Health dot Org ...
    (microsoft.public.access.forms)
  • Re: Prevent modifying a textbox using Ctrl-V (paste)
    ... > Furthermore, when I check the Locked property, its value is True... ... I've seen this behavior on an NT4 machine.... ... Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer) ...
    (microsoft.public.vb.syntax)
  • Re: one to many relationship
    ... You can set the Locked property for all the fields on your main form that ... of the subform, so that they can add new test data but not modify existing ... Graham Mandeno [Access MVP] ...
    (microsoft.public.access.forms)