fredg said:
On Sat, 20 Mar 2004 00:01:30 GMT, Dave wrote:
I have created a form in Access 97 with a check box for someone to select
that I do not want them to be able to change, for any reason, once it's
checked. Can anyone help explain how I would put in the coding to lock this
field when it's checked?
Any help would be greatly appreciated! Thanks in advance!
I assume you want it to open as unselected.
Code the Check Box AfterUpdate event:
Me![CheckBoxName].Locked = Me!CheckBoxName = -1
Place the same code in the form's Current event.
Thanks for the help! I tried that and it worked however it locked it for
all records as long as the form was open. I was able to close the form and
reopen it and check another box but then it locked that field again for all
records. Do you have any suggestions to have the coding lock only the check
box for that particular record only?
Regarding ...
a check box for someone to that I do not want them to be
able to change, for any reason, once it's checked. <
Did you do this part also?
If you place the same code in the Current event, if the check box is
not checked you will be able to check it. As long as you are on the
same record then, once checked you can not change it.
However, upon going to the next record, if the check box is checked
you can not change it.
Isn't that what your original post asked to do?
If the check box is not checked, you can check it. Then it's locked.
That's what you wanted.
But you have to place the same code in the Current event.