Ckeck box to lock control

John thomas

Registered User.
Local time
Today, 05:32
Joined
Sep 4, 2012
Messages
206
Hi
I have a check box on a form,that when ticked ,Iwant it to lock that check box (basically i dont want that info altered after this time) I know its something to do with the property but cant get it to lock the check box)
Many thanks
John
 
Manually set the check boxes Lock property to yes, or programmatically Me.CheckBoxName.locked = True
 
Hi tried that using the code but no good
My checkbox Is called Iscancelled

I have gone to its propertysheet and used on click Me.Iscancelled.locked=true
But if i go back to the form i can still use the checkbox .This should not happen once ticked i want it to remain tickedl
Thanks john
 
Hi tried that using the code but no good
My checkbox Is called Iscancelled

I have gone to its propertysheet and used on click Me.Iscancelled.locked=true
But if i go back to the form i can still use the checkbox .This should not happen once ticked i want it to remain tickedl
Thanks john

You need to enter the code within the Event Procedure of the On Click event of the checkbox. In the property sheet, Event Procedure is one of the dropdown values, select it, then click on the edit (...) button to the right.

Code as follows,

Code:
Private Sub IsCancelled_Click()
    
    Me.IsCancelled.Locked = True

End Sub
 

Users who are viewing this thread

Back
Top Bottom