This being a school project, I'll leave it to you to find an "easier" way to
do this, but explain why your current method doesn't work. Since you want to
find out how to allow edits, you might enter the search phrase "allow edit"
in Access Help.
**fieldname.unlocked**
doesn't work because there is no "unlocked" property!
The proper syntax would be
fieldname.Locked = False
Assuming that Intellisense is turned on, which is the default setting, when
you enter an object name, such as a textbox name, and follow it with a
period, Access will popup a box with all the possible properties of that
object. The next letter you type will take you to that part of the list, and
so forth.
If, in the code module, you type in
TextboxName.u
Access will take you to the ***Undo*** Property. You will immediately see
that there is no ***unlocked*** property. You can then run thru the box until,
hopefully, you find the ***Locked*** property and figure out that you need
to set that property to False.