Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Changing a subform's sourceObject

Posted on 2001-08-23
6
Medium Priority
?
599 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

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 200 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
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 …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

773 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