o-mheien@hdsoftware.no
Active member
- Joined
- Feb 6, 2007
- Messages
- 27
- Programming Experience
- 10+
Hi folks
Lets say you have two tables in the database: Customers and Orders
Ok. Lets assume the software starts with a browser that shows all the orders. User press the "insert new order" button and a blank Order form shows. On this the user can select the customer. Lets allso assume that the customer doesnt exist. This means, New order and new customer.
ok. Her's the problem:
When the user press the NEW Customer button I have the following code;
[/SIZE]
Now we have the new customer, but how to I get the new record ID to add to the order record?
Please help
Ole
Lets say you have two tables in the database: Customers and Orders
Ok. Lets assume the software starts with a browser that shows all the orders. User press the "insert new order" button and a blank Order form shows. On this the user can select the customer. Lets allso assume that the customer doesnt exist. This means, New order and new customer.
ok. Her's the problem:
When the user press the NEW Customer button I have the following code;
VB.NET:
if frmCustomers.ShowDialog = [SIZE=2]Windows.Forms.DialogResult.OK[/SIZE]
[SIZE=2] Me.CustomerTableAdapter.Insert(frmCustomer.CustomerName.text,,,,,etc)[/SIZE]
[SIZE=2]End if[/SIZE]
[SIZE=2]
Now we have the new customer, but how to I get the new record ID to add to the order record?
Please help
Ole