I am trying to make a form in Access 2003 at least appear to work like a .Net application in this way: I would like to have the form read-only until the user pushes an Edit Item button. Then, the text boxes and such would change backcolor to white to tell the user that it is good to go as far as editing is concerned. That part is very easy. In .Net, an EndEdit, I believe it is, will disable navigation away from the current record. What I would like to do is disable navigating away from the record being edited until Submit or Cancel is pushed. Right now, since the forms were made before I had achieved a certain level of sophistication, the user can page through the Items and freely edit (which can lead to mistakes) and has to push a New button to enter a new Item. I have been trying recently to get away from error-prone Forms like that, and have made several forms always read-only, with pop-up forms to handle New records and editing, but I was wondering if there was another, less intrusive to the user, way to accomplish the same thing. I thank you in advance for your time and your replies.
One solution I sometimes use consists in creating one or several collections that hold a reference to the controls I want to control collectively. the collections are created and filled in the FormOpen procedure. Several solutions can be used to determine to which collection each control pertains. A For... Each loop in then used to handle a collection collectively.
Simply making the form read-only is simpler, though: set the AllowEdits property of the form to False and apply a filter limiting it's recordset to the current record, this automatically disables navigation .