cnn.execute "insert into tblneworder2 (item) values ('dd')"
Set rst = New ADODB.Recordset
rst.Open "SELECT @@IDENTITY AS LastOrderId", _
cnn,
Options:=adCmdText
Debug.Print "OrderId for new record = " & _
rst("LastOrderId")
rst.Close
Set rst = Nothing