Is there an "How To" or other example of a data entry form with three related tables made with TableAdapters and the new technology For example a PurhaseOrder table, Product table and LineItem table.
Something simple like this.
1. The top of form has TextBoxes etc for this Purchase Order, ID, date, etc and these are bound to the PurchaseOrder table.
2. A grid is used to display rows as they are added. Each row includes a PurchaseOrderID field and a ProductID number and the grid also displays info from the third table, the Products table, such as Description and Price.
3. User types ItemID in column one and presses tab, Description etc are retrieved from Products and displayed. User types in qty and presses tab. A new row is added to the grid and the process continues.
It is the line item row that has me stumped. How to have two tables displaying in one grid row. It seems that each cell must be populated seperately. Anyway, if there is an example of this common type of form with the new vb 2005 technology I'd be very happy.
--John

How to make a form based on three related tables?
Elisio
Jason92
hi,
you can add three binding source to your form and to make the first one get its data from your dataset and dispaly memeber is you first table
your second bindingsource properties datasrouce = your first bindingsource , datamemeber = the relation between the first and second table
third bindingsource prorperties datasource = your second bindingsource , datamemeber = the relation between second and third table
now add what you want to your form textboxs datagrids or what ever you want but bound it to proper bindingsource, what will be selected in the first binding soruce the second bindsource will just curry the related data and the third will cary the related data to selected value in the second binding source
hope that helps
sunshine2005
I have some what of the same problem:
Using Visual Basic 2005 Express Edition.
If i add a new item in the first bindingsouce tabel and save it, then add an other item to the seccond bindingsource table and try to save that one to i get an error, saying that there is no related record in the first table
I dont know how to solve this problem. Can u help
Detail description under this link below:
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=293374&SiteID=1
ErnestT_MS
I was just wondering if there was an example somewhere.
--John
DreDay
I would recommend that everyone read the following articles before attempting data access in .NET 2.0.
DataSets
TableAdapters
Lucky Coder
Perfect! Thanks for taking the time to answer!
--John