Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2016-07-14
4
Medium Priority
?
38 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
[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
4 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

650 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