I want to create a sales form (parent) on the sales table with the unique code to each item; which displays its corresponding list items. I want also to create another form (child) on the same sales table with blank textboxes to enter date, qty, unitprice and totalprice.
I want to create a link to the two forms so that when I click on the unique code on the main form with the detailed items displayed, the child form would display with blank form so that I can fix the sale prices and date to appear against the list items.
I will be thanksful for an assistance to complete my project successfully.
Thanks

Aman GuptaPosted Sep 24, 2024, 6:40 AM
Hi David,
To achieve the functionality where clicking on a unique code in the parent form opens a child form with blank textboxes to enter data, you can follow these steps in a Windows Forms application (assuming you're working with WinForms). The general approach involves passing the selected ID from the parent form to the child form.
Steps:
Example Implementation:
1. Parent Form (Sales Form)
This form displays a DataGridView with sales items. When you click an item, it opens the child form.
2. Child Form (Blank Form for Entering Details)
This form will display textboxes where the user can enter the details. The unique code will be passed to it.
3. DataGridView Setup in Parent Form
Make sure the DataGridView on the parent form has a column for the UniqueCode and that the CellClick event is wired up.
This approach keeps the logic modular and allows for easy data entry and updates between the two forms. Let me know if you need any adjustments or further details!
pavinaPosted Sep 23, 2024, 12:42 PM
from what i understand you want to create a sales application with two forms: a parent form that displays items with unique codes and allows users to click on a code to open a child form. The child form will have blank fields for entering sales details like date, quantity, unit price, and total price.
so in the Parent Form (Sales Form):
in child form:
Modify the constructor to accept the unique code.
Add TextBoxes for date, qty, unit price, and total price in the child form.
Parent Page:
Child Page:
hope this is helpfull