Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 39
  • Last Modified:

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

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
Fordraiders
Asked:
Fordraiders
  • 2
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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
 
FordraidersAuthor Commented:
scott, Thanks.
That worked.
0
 
FordraidersAuthor Commented:
thnx
0
 
Helen FeddemaCommented:
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

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now