PC Review


Reply
Thread Tools Rate Thread

allowadditions in subform

 
 
geebee
Guest
Posts: n/a
 
      26th Jan 2009
hi,

i would like for the subform to be dynamically changed to where records can
be added when the main form is loaded... i now have:

Forms!frm_charity.Control!sbfrm_template.AllowAdditions = True


but i am getting an application-defined or object-defined error message.

not sure what to do.

thanks in advance,
geebee

 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      26th Jan 2009
It needs to be one of

Forms!frm_charity!sbfrm_template.Form.AllowAdditions = True

or

Forms!frm_charity.Controls("sbfrm_template").Form.AllowAdditions = True

Be careful, though, that you're referring to the subform control. Depending
on how you added the form as a subform, the name of the subform control may
not be the same as the name of the form being used as a subform.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"geebee" <(E-Mail Removed)(noSPAMs)> wrote in message
news:231F71B3-5AD7-4497-AA86-(E-Mail Removed)...
> hi,
>
> i would like for the subform to be dynamically changed to where records
> can
> be added when the main form is loaded... i now have:
>
> Forms!frm_charity.Control!sbfrm_template.AllowAdditions = True
>
>
> but i am getting an application-defined or object-defined error message.
>
> not sure what to do.
>
> thanks in advance,
> geebee
>



 
Reply With Quote
 
Dirk Goldgar
Guest
Posts: n/a
 
      26th Jan 2009
"geebee" <(E-Mail Removed)(noSPAMs)> wrote in message
news:231F71B3-5AD7-4497-AA86-(E-Mail Removed)...
> hi,
>
> i would like for the subform to be dynamically changed to where records
> can
> be added when the main form is loaded... i now have:
>
> Forms!frm_charity.Control!sbfrm_template.AllowAdditions = True
>
>
> but i am getting an application-defined or object-defined error message.
>
> not sure what to do.



Your syntax is wrong in two ways. First, it should be "Controls", not
"Control"; second, you need a ".Form" qualifier after "sbfrm_template".
You can leave out the ".Controls" qualifier entirely, though. Try this:

Forms!frm_charity!sbfrm_template.Form.AllowAdditions = True

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)

 
Reply With Quote
 
Marshall Barton
Guest
Posts: n/a
 
      26th Jan 2009
geebee <(E-Mail Removed)(noSPAMs)> wrote:

>i would like for the subform to be dynamically changed to where records can
>be added when the main form is loaded... i now have:
>
>Forms!frm_charity.Control!sbfrm_template.AllowAdditions = True
>
>but i am getting an application-defined or object-defined error message.



If sbfrm_template is the name of the subform **control** on
the main form, I think that should be:

Me!sbfrm_template.Form.AllowAdditions = True

--
Marsh
MVP [MS Access]
 
Reply With Quote
 
dymondjack
Guest
Posts: n/a
 
      26th Jan 2009
Have you tried specifying the subform .Form in your code?

Instead of
> ...sbfrm_template.AllowAdditions = True


try

....sbfrm_template.Form.AllowAdditions = True

--
Jack Leach
www.tristatemachine.com

- "A designer knows he has reached perfection not when there is nothing left
to add, but when there is nothing left to take away." - Antoine De Saint
Exupery


"geebee" wrote:

> hi,
>
> i would like for the subform to be dynamically changed to where records can
> be added when the main form is loaded... i now have:
>
> Forms!frm_charity.Control!sbfrm_template.AllowAdditions = True
>
>
> but i am getting an application-defined or object-defined error message.
>
> not sure what to do.
>
> thanks in advance,
> geebee
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
form / subform - limit allowadditions to one (1) Rick A Microsoft Access Form Coding 2 25th Mar 2006 01:12 PM
Subform Disappears when AllowAdditions=False =?Utf-8?B?TG93cmlkZXI3Mg==?= Microsoft Access 5 10th Dec 2005 05:50 AM
Any way of using in VB AllowAdditions for a subform? =?Utf-8?B?SmFzb24=?= Microsoft Access VBA Modules 2 2nd Dec 2005 11:56 PM
AllowAdditions on the Form and the SubForm =?Utf-8?B?UGV0ZXI=?= Microsoft Access Forms 1 24th May 2005 11:33 PM
subform.AllowAdditions ray Microsoft Access Forms 2 4th Nov 2003 01:09 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:13 AM.