Disabling unticking of tick boxes

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

I have a tick box on a continuous form. What I need is to disallow unticking
of a tick box once it has been ticked. How can I achieve this on a
continuous form?

Thanks

Regards
 
Hi

I have a tick box on a continuous form. What I need is to disallow unticking
of a tick box once it has been ticked. How can I achieve this on a
continuous form?

Thanks

Regards

This seems a very strange thing to do (the user checks a box by mistake and is
forbidden from correcting that mistake!?), but you can use a line of code in
the checkbox's AfterUpdate event:

Private Sub chkMyCheckbox_AfterUpdate()
Me!chkMyCheckbox = True
End Sub

This will set it to True (checked) whenever the user alters its value - if she
sets it to True this just sets it to True again, if she sets it to False it
gets set back to True.

Steve's suggestion will prevent either unchecking OR checking it,
unfortunately.
 
Set the Tick box control's validation property to true. Once a record
associated with the form has been "ticked" and saved, you cannot change
the value on the form to unchecked.



'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
Hi

I have a tick box on a continuous form. What I need is to disallow unticking
of a tick box once it has been ticked. How can I achieve this on a
continuous form?

Thanks

Regards

Hi,

Private Sub chkMyCheckbox_AfterUpdate()
If chkMyCheckbox = False Then
chkMyCheckbox = True
End If
End Sub

It will allow to tick the checkbox, but it won't allow to be set as
False.

Regards,
Branislav Mihaljev
Microsoft Access MVP
 
Back
Top