How do I get the unique id from my table when a new row is added to my dataset

Please bear with me as I am new to Visual Basic.  I'm using Visual Studio to develop a Windows application.  The database I am connecting to is MS Access.  I can successfully add new records to the database.  What I now need to do is each time I add a new employee to the database, I want to retrieve the unique id (ID autonumber) from the just added record so I can use it to add a "History" record to another table that maps back to the new employee.  I will be adding a lot of employees so I want to wait until all of the employees have been added to the dataset before I update the physical database using the following code:  Me.EmployeeTableAdapter.Update(Me.HWDataSet.Employee).

What I need is the code that will retrieve the unique id generated from the Me.HWDataSet.Employee.Rows.Add(EmployeeRow) call.

Any help would be greatly appreciated!
Dim EmployeeRow As HWDataSet.EmployeeRow
' Insert Employee into dataset
Catch ex As Exception
End Try

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Follow the link from Microsoft.. :)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dyaroshAuthor Commented:
Thanks for the link.  The article runs the Identity Select after an Update() is called.  I was hoping to hold off on calling Update() until after all of the records have been loaded into the dataset.  Is there a way to do this?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.