Solved

MS Access SourceObject

Posted on 2006-06-29
5
1,359 Views
Last Modified: 2008-01-09
This is information that I found out after beating my head for 4+ Hrs. It may help someone else.

I use subforms a lot. In the past if I wanted to use multiple subforms in the same screen area I would use Hide/Visible to get this done. I decided to change the SourceObject of a general subform to make the design form easyer to work with. My first form worked fine and it got me to try it again.

On my second form I did the subform but no records or one record were being displayed after I executed the SourceObject. If I ran the subform all by it's self all the data showed up. I made sure all filters were turned off, but all the data would not show up. I checked the subform info on the parent form and noticed that "ID" was showing up in both the "Link master/child" fields. I set them to "Empty" with VBA code after using the SourceObject but the data did not display. I found that the RecordSource data in both the main form and the subForm had a field named "ID". No mater what I did MS was setting up the Link. I could make the Parent form unbounded or change the field name to be different. I changed the field names and all works well.

I tried all kinds on VBA code syntax.
     Me.Subx1.SourceObject = "subF2"
     Me!Subx1.SourceObject = "subF2"
     Forms!form1!Subx1.SourceObject = "subF2"
Save your time syntax was not the problem. MS was just helping me out tooooooooo much.
0
Comment
Question by:georgefanno
[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
  • 2
5 Comments
 
LVL 65

Expert Comment

by:Jim Horn
ID: 17013216
Is this a question?
0
 
LVL 54

Expert Comment

by:nico5038
ID: 17013636
This "problem" is cause by the subform wizard, but you can prevent a link to a subform by selecting "None" when the wizard asks you for linking fields.

Personally I use a tab control in your situation to have all subforms on the same mainform and just show the needed subform page and hide the buttons so the users don't even know there's a tab control.

Nic;o)
0
 

Author Comment

by:georgefanno
ID: 17020197
Thanks for the tip. You get the 100 points.
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 100 total points
ID: 17020824
Glad to see I learned you something new :-)

Success with your application !

Nic;o)
0

Featured Post

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
Creating a Temp Table in MS Access 5 44
query error in former passthrough query 2 32
MS Access, Class Objects, Modules, Class Modules 6 35
Access Query: Text to Date 10 31
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

756 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