I have a couple of questions about a project I am working on involving an access database and a vb.net windows form.
I have an Access Database that is used to keep track of brokers commissions. On a form, I display the line items from a particular invoice (based on the invoice number typed into the textbox) in a datagrid. Since Im pretty new to VB Net, I would like to find out if it is possible to add new tasks, change existing tasks, or delete existing tasks using just the datagrid. It looks like I can type in the datagrid, to add a new task. It also looks like I can change existing tasks information, but I dont know how to identify the changes so I can update the database. For adds - I have 4 textboxes and two comboboxes that I want to use to add new records. How do I get the textboxes and comboboxes to add to the datagrid, so it can be inserted into the database?
For updates or deletes, how can I identify which line on the datagrid I have updated or marked to be deleted? After I have updated the data grid, how do I take all the data in the datagrid and send it to a new table in the same access database(not the same table is was populated with)?
Also, I have two radio buttons above the datagrid that is check yes or no depending on if teh customer took the discount. If the yes radio button is checked I want to total amount for each line item to be lowered by a % that is displayed in a label. (I could also have the discount percent be displayed in the datagrid but dont know how to make the datagrid know that if the radio button "YES" is selected to use the amount in in the discount column in the total calculation.
Thanks, Brent
I have an Access Database that is used to keep track of brokers commissions. On a form, I display the line items from a particular invoice (based on the invoice number typed into the textbox) in a datagrid. Since Im pretty new to VB Net, I would like to find out if it is possible to add new tasks, change existing tasks, or delete existing tasks using just the datagrid. It looks like I can type in the datagrid, to add a new task. It also looks like I can change existing tasks information, but I dont know how to identify the changes so I can update the database. For adds - I have 4 textboxes and two comboboxes that I want to use to add new records. How do I get the textboxes and comboboxes to add to the datagrid, so it can be inserted into the database?
For updates or deletes, how can I identify which line on the datagrid I have updated or marked to be deleted? After I have updated the data grid, how do I take all the data in the datagrid and send it to a new table in the same access database(not the same table is was populated with)?
Also, I have two radio buttons above the datagrid that is check yes or no depending on if teh customer took the discount. If the yes radio button is checked I want to total amount for each line item to be lowered by a % that is displayed in a label. (I could also have the discount percent be displayed in the datagrid but dont know how to make the datagrid know that if the radio button "YES" is selected to use the amount in in the discount column in the total calculation.
Thanks, Brent