Solved

Loading Subform with all records even if it is linked to child field

Posted on 2016-07-14
4
25 Views
Last Modified: 2016-07-18
I have a bound form.
with a subform.

I have the subform on a master child link with Form.

However, When the form initially loads. I need the subform to load all records.
Basically the same recordsource. but so all records are visible.

This will not work:

Me.Search_Term.SetFocus
Me.Search_Term.Text = ""
Me![WR294_GRIDVIEW subform].Form.RecordSource = "SELECT WR294_GRIDVIEW.ID, WR294_GRIDVIEW.[Customer Name], WR294_GRIDVIEW.[Customer #], WR294_GRIDVIEW.[Quote #], WR294_GRIDVIEW.[Price Agreement], WR294_GRIDVIEW.[Supplier #], WR294_GRIDVIEW.[Created By], WR294_GRIDVIEW.Created, WR294_GRIDVIEW.[Supplier Response Date] FROM WR294_GRIDVIEW WHERE WR294_GRIDVIEW.ID <> ""A"";"

master  =  WR294_GRIDVIEW.[Customer Name]
child  =     Search_Term

Open in new window


Thanks
fordraiders
0
Comment
Question by:fordraiders
  • 2
4 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 500 total points
ID: 41712642
You'd have to remove the Master and Child links, and set the Recordsource to show all records.

Me.YourSubformControl.LinkMasterFields = ""
Me.YourSubformControl.LinkChildFields = ""
Me.YourSubformControl.Form.Recordsource = "Your Recordsouce Here"
0
 
LVL 3

Author Comment

by:fordraiders
ID: 41712974
scott, Thanks.
That worked.
0
 
LVL 3

Author Closing Comment

by:fordraiders
ID: 41712975
thnx
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 41717449
You might need to write some code that would let you either display linked data, or all data, in the subform -- possibly running from an option group or some other control on the main form.
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

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

743 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

8 Experts available now in Live!

Get 1:1 Help Now