P
Peter Hallett
I have a form and sub-form, where the AllowEdits property of the former is
set True (and therefore inherited by the sub-form on opening). If the first
data entry is made to the main form then the need is to reset the AllowEdits
property of the sub-form to False, and vice versa – i.e. if the first data
entry is made to the sub-form then the AllowEdits property of the main form
is to be set False. The On Dirty property provides a convenient way of
actioning the first data entry but the compiler is wholly unco-operative when
it comes to changing the AllowEdits property. Thus, although it recognizes
‘Me.sfrm_Sub_Form’ and happily returns the correct sub-form name in response
to, say, ‘Me.sfrm_Sub_Form.Name’ it fails to acknowledge
‘Me.sfrm_Sub_Form.AllowEdits’ as valid, although it has no difficulty with
‘Me.AllowEdits’. Either I have the syntax wrong or the compiler is telling
me that I am not entitled to change the AllowEdits property of the sub-form
from the main form and, possibly, vice versa. I suspect that the latter is
the case but would someone be kind enough to enlighten me and perhaps suggest
a fix? The alternative of individual control locking is considerably less
attractive.
set True (and therefore inherited by the sub-form on opening). If the first
data entry is made to the main form then the need is to reset the AllowEdits
property of the sub-form to False, and vice versa – i.e. if the first data
entry is made to the sub-form then the AllowEdits property of the main form
is to be set False. The On Dirty property provides a convenient way of
actioning the first data entry but the compiler is wholly unco-operative when
it comes to changing the AllowEdits property. Thus, although it recognizes
‘Me.sfrm_Sub_Form’ and happily returns the correct sub-form name in response
to, say, ‘Me.sfrm_Sub_Form.Name’ it fails to acknowledge
‘Me.sfrm_Sub_Form.AllowEdits’ as valid, although it has no difficulty with
‘Me.AllowEdits’. Either I have the syntax wrong or the compiler is telling
me that I am not entitled to change the AllowEdits property of the sub-form
from the main form and, possibly, vice versa. I suspect that the latter is
the case but would someone be kind enough to enlighten me and perhaps suggest
a fix? The alternative of individual control locking is considerably less
attractive.