Hi,

Im using a querydef object for inserting into a table. But in that table there is a automated genereated primary key. How can I get that key once the recored successfully inserted into the table?

Here is my code:

Dim qry As QueryDef
str = "INSERT INTO Vendor (vendor) VALUES ('" & VendorList.Valu e & "')"
qry.SQL str
qry.Execute

So in the...