cwnonthehill
Member
- Joined
- Nov 5, 2012
- Messages
- 20
- Programming Experience
- 1-3
Hey guys, I'm new to the forum, so thanks in advance for your time and help!!
I will do my best to explain my situation...
I have two SQL Tables and am using VB to represent a user interface for adding/editing this data... Below are screenshots of my two tables
tblCollection
===========
and tblCollectionDetails
===================
Note - tblCollectionDetailshas an FK relation to tblCollection by RecordID
This is my Only VB Form
===================
As you can see, i have a toolbar to cycle through the records from tblCollection by RecordID. Each RecordID has details that correspond from tblCollectionDetails, those details will be displayed in the DataGridView based on RecordID. I have sucessfully been able to get/populate top half of the VB form with data from tblCollection. the problem I am having is how to get/populate the DataGridView with ONLY corresponding details in tblCollectionDetails based on the RecordID from tblCollection.
Note - Kind of what this reminds me of is a Dependant Table in MS Access, where each row in a table has the + sign, and when the + sign is clicked, it displayed the corresponding data from another table. What is this called in SQL?
My question is, what is the best way to go about this? Do I somehow create a parent/child relationship in SQL? Or will I do this with VB? How?
THANKS! i know its confusing and i will be happy to explain anything!
I will do my best to explain my situation...
I have two SQL Tables and am using VB to represent a user interface for adding/editing this data... Below are screenshots of my two tables
tblCollection
===========
and tblCollectionDetails
===================
Note - tblCollectionDetailshas an FK relation to tblCollection by RecordID
This is my Only VB Form
===================
As you can see, i have a toolbar to cycle through the records from tblCollection by RecordID. Each RecordID has details that correspond from tblCollectionDetails, those details will be displayed in the DataGridView based on RecordID. I have sucessfully been able to get/populate top half of the VB form with data from tblCollection. the problem I am having is how to get/populate the DataGridView with ONLY corresponding details in tblCollectionDetails based on the RecordID from tblCollection.
Note - Kind of what this reminds me of is a Dependant Table in MS Access, where each row in a table has the + sign, and when the + sign is clicked, it displayed the corresponding data from another table. What is this called in SQL?
My question is, what is the best way to go about this? Do I somehow create a parent/child relationship in SQL? Or will I do this with VB? How?
THANKS! i know its confusing and i will be happy to explain anything!