I created a form with a Datasheet as subform, and need to turn Add, Delete, Edit ON/OFF. I've tried various VBA methods, such as setting these 3 properties for the main form True/False via a command button. This sets the main form, but does not prevent anything on the subform. Search yielded one post (50638) on this topic; however, trials did not end with success.
Additionally, I set the .Locked property of the subform to False/True along with the above 3 properties in the main form...all to no avail.
Additionally, I set the .Locked property of the subform to False/True along with the above 3 properties in the main form...all to no avail.
- (Misc Note: "This Main form" is opened from a "larger main form" via command button.)
- This Main form is based on table: tblDOCUMENTSonly
- This Main form has 3 controls:
- Close command button
- ON/OFF command button (toggle, toggle config works fine in other forms where appropriate)
- Datasheet as subform
- Subform is based on table: tblDOCUMENTSonly (default view: Datasheet)
- 2 Fields (in table): DocumentInMainFolder, MainFolder
- DocumentInMainFolder is indexed no duplicates in this table
- MainFolder is indexed duplicates OK in this table
- MainFolder is indexed no duplicates in table tblMainFolderONLY
- Relationship 1toMany (docs in docs table=1, folders in docs table=many)
- tblMainFolderONLY has 2 fields: MainFolder (no dupl), DocumentCategory (dupl OK, field not involved in these forms)
- MainFolder is indexed no duplicates in table tblMainFolderONLY
- Although the database has a total of 9-ea. 1toMany relationships, there is only one relationship involving tblDOCUMENTSonly (to tblMainFolderONLY)