Disable or lock a control based on the value of another control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Basically I want to lock any further input to a control once a tick box has
been checked. I know it can be done but i really need an example to work off
and can't find one.

can anyone help?
 
Mark said:
Basically I want to lock any further input to a control once a tick
box has been checked. I know it can be done but i really need an
example to work off and can't find one.

can anyone help?

Me.ControlName.Locked = Me.CheckBoxName

You will likely need that in both the AfterUpdate of the CheckBox and the
Current event of the form.
 
Sorry, I think i need further help!
I understand when you say put code in the afterupdate of the check box, but
where exactly should i put the code in the 'currenevent' of the form?
 
Private Sub Form_Current()
Me.ControlName.Locked = Me.CheckBoxName
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top