subform.AllowAdditions

  • Thread starter Thread starter ray
  • Start date Start date
R

ray

Hello !
I have a subform in a main form.The main form does not
have any record source,i have put it so that the data in
the sub form can be scrolled and the subform can be small
in size.
When i open this main form from another form,i want to be
able to make the subform allowaddition property=false.
I tried forms!Mainform!subform.AllowAdditions=false but i
get an error saying that the method is not supported.
How do i make a subform's Allowadditions property = false
tia
ray
 
You have to reference the 'form' property of the subform control - your
reference is to the subform control (which doesn't have an allowAdditions
property). Try this instead:

forms!Mainform!subform.form.Allowadditions=false
 
forms!Mainform!subform only refers to the SubForm *Control*. You want the
Form inside the SubForm Control, hence:

Forms!Mainform!subform .Form.AllowAdditions = False
 
Back
Top