I have form with few fields which I would like to have changed into non editable after combo box named "Completed" is checked off.
How can I do that?
Dariusz
I have form with few fields which I would like to have changed into non editable after combo box named "Completed" is checked off.
How can I do that?
Dariusz
You would do this in the After Update event of the checkbox, using
Me!controlname.locked = True
or
me!controlname.enabled = False
The difference is that setting Enabled to false also dims the appearance of the control - setting Locked = True doesn't, but both prevent editing.
You need to take care of the case where the combo box is changed from Completed back to something else:
If me!combocontrol = "Completed" then
'
' Disable or lock controls
'
Else
'
' Enable or unlock controls
'
endif
HTH
John
Also, don't forget to put the same code in the Current event (or use a function) to handle the changing of records.
Thanks, Paul - I missed that.
John
No problem John.
John, Paul
Thank you very much for your help , I will add it today.
Dariusz