Solved

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

Posted on 2016-07-14
4
29 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
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.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

776 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