|
-
Dec 4th, 2004, 07:37 PM
#1
Thread Starter
New Member
Populating a subform with data from a query
Hi.
I am struggling with a problem...
I have a form called Car_Search. The user selects a parameter such as car manufacturer or types in a model number that s/he wants to search for. The parameters are fed into a query that then returns the data as a datasheet. I would like the returned data to populate a subform that is positioned underneath the search fields within the main search form.
How can I implement this?
Thanks!
Jon
-
Dec 5th, 2004, 12:43 AM
#2
Re: Populating a subform with data from a query
Welcome to the Forums.
On the subform, you can set the "Source Object" to the parent form. Then
set the "Link Child Field" and "Link Master Field" to their respective fields.
Then when you filter the parent form it should reflect similar in the subform.
HTH
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 5th, 2004, 02:05 AM
#3
Thread Starter
New Member
Re: Populating a subform with data from a query
Hi.
Thanks for the quick response.
I have linked the two together but when I hit the command button to run the query linked to the form (the query takes parameters from the form), I just get a separate datasheet pop up instead of the data passed to the subform?
Is there a way of taking the data from the query (it is currently displayed in the form of a datasheet that pops up) and feeding that into a datasheet below the main form?
Thanks again.
Jon
-
Dec 6th, 2004, 09:50 PM
#4
Re: Populating a subform with data from a query
Sorry for the delay.
If I understand correctly, you have a main form that has a table as a
recordsource. Then the popup secondary form runs as query but with a
parameter that the user selected. Now you want to load the datagrid data
in the popup secondary form back into the first main form?
Also, these are two separate forms and not a nested subform?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Dec 6th, 2004, 09:53 PM
#5
Thread Starter
New Member
Re: Populating a subform with data from a query
Thanks for the reply but I handed in the piece of coursework today and so do not require any further assistance.
I can't remember what I did but I changed it in some way.
Thanks again.
-
Dec 6th, 2004, 10:49 PM
#6
Re: Populating a subform with data from a query
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|