I have a project with 3 Forms.
The 1st Form sets the database connection to my SQL-database. then it opens the next Form.
In the second form I have 2 DataGridViews. 1 for my customertable and one for my ordertable. I have set the relations that if I select a customerID the orders for this customer appears in the DataGridView for the ordertable.
My problem appears when i need to open my 3rd form. Here I want to select a
OrderID in my dataGridView and press my openDetails button and open the 3rd form whch contains a DataGridView for the orderDetailstable. I have set the relation correct but I can not find the right code to transfer the commando for what data to display onto the 3rd form.
I hope you all understand what I am trying to figure out here, and all replies are welcome.
Best Regards
John
The 1st Form sets the database connection to my SQL-database. then it opens the next Form.
In the second form I have 2 DataGridViews. 1 for my customertable and one for my ordertable. I have set the relations that if I select a customerID the orders for this customer appears in the DataGridView for the ordertable.
My problem appears when i need to open my 3rd form. Here I want to select a
OrderID in my dataGridView and press my openDetails button and open the 3rd form whch contains a DataGridView for the orderDetailstable. I have set the relation correct but I can not find the right code to transfer the commando for what data to display onto the 3rd form.
I hope you all understand what I am trying to figure out here, and all replies are welcome.
Best Regards
John