Usually I can tell if a method is running the context of a subform by testing the pointer returned by
Object get pointer(Subform Container)
If the pointer is nil the context is not a subform. This is no longer true in v17 under the following conditions:
- the subform container is an object (possibly a collection)
- the subform container’s dataSource is a reference to some other data object (eg. Form, ds or some other data)
I suspect the reason is because in this configuration you can’t modify the contents of the subform object directly (you would go modify the data it’s linked with instead). That’s fine. What I need to know is how to determine being in a subform without benefit of this trick?