It might be a case of ‘Hindsight is the only exact science.’
It looks wrong because people would expect a Form as the SourceObject of a subform control yet, initially, there is no Form. Nor is there a Form, used as a subform, in the database window, which is an important factor. It becomes important in not having to create a Form, which is used as a subform, where that Form has fixed Fields.
It is not
just a Locked subform control with a Table as the SourceObject. The Locked property of the subform control in my posted database was a misguidance.
It does not matter if the subform control is Locked or not. The requirement is to set the Form, in that subform control, to 2 (Snapshot). It is the Form in the subform control, not the subform control itself, which needs to be protected from change. Hence the line of code:-
Me.ctlForm.Form.RecordsetType = 2
is required
if the Record Source of that Form needs to be protected from change. (Make it read only.{RO})
Anything we may have done in the past is hearsay without the proof supplied.
Data access management properties or conditional formatting is irrelevant to the current requirement. (Even assuming we know what they may mean.)
Post #2 reflected the current understanding at the time; “A user should not open a table.” and others also agreed. I think that response needs to be looked more closely especially since the word ‘user’ has not been defined in this thread. That would be another thread based on the ‘user’ level of security.
-------
In my view, if any criticism is to be made of this technique it would have centred on Queries and not Tables. It may be appropriate to view an action Query or it may not. The point here is that, if this technique was well understood then an objection to action Queries should have been raised not an objection to Tables. Since that objection was not raised then I think the objection to this technique is not well understood.
-------
The requirement of this thread is to
Open Table as Read Only.
I think that requirement has been fulfilled.
Chris.