To explain Arno's answer further, you can refer to the form in the subform
control with the .Form property.
Try:
Me.Controls("subnonstorePos").Form.AllowEdits = False
or just:
Me.subnonstorePos.Form.AllowEdits = False
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users -
http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Arno R" <ar***********@tiscali.nl> wrote in message
news:42*********************@dreader2.news.tiscali .nl...
"Gerry Abbott" <pl****@ask.ie> schreef in bericht
news:6I*******************@news.indigo.ie...
Im wondering why the following will work
Me.Controls("subnonstorePos").visible = False
while
Me.Controls("subnonstorePos").AllowEdits = False
give me an
'property not support by this object error'
It is because ... 'the property is not supported by this object' ..
AllowEdits is a form-property, not a control-property.
You need the property 'Locked' I guess
--
Hope this helps
Arno R