Rusty Hammond
Rusty.Hammond at cpiqpc.com
Tue Nov 5 15:48:45 CST 2013
Lambert, use the LastModified property: With rst .AddNew ![SomeField1] = "SomeValue" ![SomeField2] = "SomeValue2" .Update .BookMark = .LastModified intPriKey = ![PrimKeyID] End With HTH, Rusty -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, Lambert Sent: Tuesday, November 05, 2013 3:14 PM To: 'Access-D Email (accessd at databaseadvisors.com)'; 'ACCESS-L Email(ACCESS-L at PEACH.EASE.LSOFT.COM)' Subject: [AccessD] Getting the Primary Key of a New records in Oracle Does anyone know how I can retrieve the primary key value from a new record just added to a linked Oracle table using VBA? I.e. I create a records using VBA, populate the fields with VBA and update the record. How do I then find out what the primary key value allocated by Oracle is? The key field is of type NUMBER(10) and it is populated by a trigger (which I have no control over). Lambert -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com ********************************************************************** WARNING: All e-mail sent to and from this address will be received, scanned or otherwise recorded by the CPI Qualified Plan Consultants, Inc. corporate e-mail system and is subject to archival, monitoring or review by, and/or disclosure to, someone other than the recipient. **********************************************************************