Update: Manually losing the form and re-opening it also causes editing to be allowed, please see Step 4 below and "Additional Notes" section below. Thanks!
An MS-Access 2007 database that I have simplified a great deal during troubleshooting still has the same problem:
- Restart Access and open the database
- The autoexec calls a vba function that initializes some TempVars, then opens a form with: `DoCmd.OpenForm FormName:="MainEditor"
- All Bound and Un-Bound Text Boxes and Combo Boxes display their data correctly, but NONE of them can be edited. Keystrokes are ignored, pull-downs on Combo Boxes display lists of choices correctly but no choice can be selected.
- Change the form's view to Design View, then immediately change it back to Form View. Alternatively, manually close the Form and then re-open it.
- All the controls continue to display their data correctly, but now ALL of them can be edited normally.
After changing to Design View and back to Form View, the Form is editable normally until Access is shut down and restarted.
Additional Notes:
I tried adding a DoCmd.Close
and a DoCmd.FormOpen
immediately after the original DoCmd.FormOpen
in the startup function called by the Autoexec macro, but the Form remained unable to accept edits. Manually closing the form, and then manually re-opening it, seems to work every time. Is there any chance that Access needs a delay to process before opening the form, and manually doing the close/open cycle provides that time window?
Here's some background:
- The Table has a primary index, 4 other indexes, and one-to-many relations to 7 other tables.
- The Form's Record Source is the Table, and Allow Edits = Yes.
- All the controls on the Form are set: Enabled = Yes, and Locked = No.
- There are no sub-forms, only the one Form.
This isn't much to go on. If you ask for further specifics I'd be glad to provide them.
Thank you. Dave