Solved

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

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
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 views 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 Microsoft Access…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

685 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