subform.AllowAdditions

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
 
S

Sandra Daigle

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
 
V

Van T. Dinh

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

Forms!Mainform!subform .Form.AllowAdditions = False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top