Solved

Changing a subform's sourceObject

Posted on 2001-08-23
6
587 Views
Last Modified: 2006-11-17
Can you change a subform's sourceObject in an ADP?  In the AfterUpdate event of a combo box I set the subform's SourceObject.  I receive the error

"The setting you entered isn't valid for this property."

Thank you.
0
Comment
Question by:accesslite_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 1

Expert Comment

by:kkelln
ID: 6420203
Can you tell me what an ADP is?
0
 
LVL 1

Expert Comment

by:shageman
ID: 6420353
Me.subformwhatever.SourceObject = "subformwhatevername"
0
 
LVL 2

Expert Comment

by:hotbudare
ID: 6420355
accesslite,
Would u please send the code u r using?

kkelln,
ADP: Access Data Project. A new (since A2K) type of access application, specially suited to use SQL as a backn end.

HTH/EQTA
T.S.U. Mario Osorio
Punto Fijo, Falcon, Venezuela
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Comment

by:accesslite_
ID: 6420545
This was the format (shown below) that I used when I received the error message...

Me.subformwhatever.SourceObject = "subformwhatevername"
0
 
LVL 1

Expert Comment

by:shageman
ID: 6420550
Strange, are you sure you have to correct subform name?
0
 
LVL 1

Accepted Solution

by:
kkelln earned 50 total points
ID: 6421765
I am not sure it matters, but the present syntax offered was:

Me.subformwhatever.SourceObject = "subformwhatevername"

After "Me" is "." - should this read "!":

Me!subformwhatever.SourceObject = "subformwhatevername"

Also, on occassion, I have noticed that using "me" to stand in place of the form name produces unexpected results.  Perhaps try:

Forms!Mainform!subformwhatever.SourceObject = "subformwhatevername"

If none of this works, before changing the source object, try setting the .LinkChildFields and .LinkMasterFields to null or "".  It seems to me that when you change the object source, this should occur by itself but perhaps not.  Maybe the new form does not have the same child field name and this is causing the problem.


Finally, copy the form you are attempting to insert as the source object ("subformwhatevername") - call this new form something simple, like "Test1".  In your naming convention of the new form, restrict yourself to letters only.  Modify your code to refer to this new form and then run it.

If the above test works, then either the name of the form or the form itself is problematic.  If this test fails, create a new form from scratch - put no objects on it.  Give this new form a simple name.  Modify your code accordingly (to refer to the new form) and then test it.

If this fails, go to the form where your subform resides.  Add a new subfrom from the tool bar - do NOT copy and paste from somewhere.  Keep all settings (including the name) the same - blank out the Link child and master fields properties.  When setting up the subform, use a third as yet unrelated form.  Modify your code to refer to the new form and see is it works.

Hope some of this helps.

Kirk out
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question