Solved

Changing a subform's sourceObject

Posted on 2001-08-23
6
563 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_
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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

705 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now