By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,056 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

Set nested (level 3) subform's AllowAdditions Property to True

P: 5
Dear All,

When I use this expression to refer to sub-form on a form it works:
Expand|Select|Wrap|Line Numbers
  1. Me.sfrmTexnikIsleri.Form.AllowAdditions = True
But in this expression program does not recognize the name of second sub-form
Expand|Select|Wrap|Line Numbers
  1. Me.sfrmTexnikIsleri.sfrmTexOdenish.Form.AllowAdditions = True
(sfrmTexOdenish is a sub-form on the sfrmTexnikIshleri)


Could you please help me with this issue.

Thanks a lot

Gulnara
May 10 '10 #1

✓ answered by TheSmileyCoder

Try:
Expand|Select|Wrap|Line Numbers
  1. Me.sfrmTexnikIsleri.Form.sfrmTexOdenish.Form.AllowAdditions = True
If that doesn't work, you need to look at the control containing the subform, and make sure its name is correct. If you name it for examle ctrlfrm_TexOdenish the correct syntax would be:
Expand|Select|Wrap|Line Numbers
  1. Me.sfrmTexnikIsleri.Form.ctrlfrm_TexOdenish.Form.AllowAdditions = True

Share this Question
Share on Google+
6 Replies


TheSmileyCoder
Expert Mod 100+
P: 2,321
Try:
Expand|Select|Wrap|Line Numbers
  1. Me.sfrmTexnikIsleri.Form.sfrmTexOdenish.Form.AllowAdditions = True
If that doesn't work, you need to look at the control containing the subform, and make sure its name is correct. If you name it for examle ctrlfrm_TexOdenish the correct syntax would be:
Expand|Select|Wrap|Line Numbers
  1. Me.sfrmTexnikIsleri.Form.ctrlfrm_TexOdenish.Form.AllowAdditions = True
May 10 '10 #2

P: 5
@TheSmileyOne
Dear TheSmileyOne,

It works. Thanks a lot!!!!!!!!

Gulnara
May 10 '10 #3

TheSmileyCoder
Expert Mod 100+
P: 2,321
Your welcome.
May 10 '10 #4

NeoPa
Expert Mod 15k+
P: 31,494
Your second attempt appears to be referring to a subform on a subform. Subforms are controls and not forms, so you need to reference the subform on the form on the subform ...

For a fuller explanation see Referring to Items on a Sub-Form.

BTW. Using .Form. is not generally necessary as the bang (!) can be used to replace it.
EG.
Expand|Select|Wrap|Line Numbers
  1. Me.sfrmTexnikIsleri!sfrmTexOdenish!AllowAdditions = True
May 10 '10 #5

P: 5
@NeoPa
NeoPa,

Thank you very much for your help.

Gulnara
May 10 '10 #6

NeoPa
Expert Mod 15k+
P: 31,494
A pleasure to help, though Smiley's post had already done most of the hard work :)
May 10 '10 #7

Post your reply

Sign in to post your reply or Sign up for a free account.