<html><div style='background-color:'><DIV>
<P>What about a form that is bound to a SQL statement. When there is no code to insert the record, is there a way to get that Autonumber?<BR>_d<BR></P></DIV><BR><BR><BR>
<DIV></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif" color=#6666ff size=2><EM>"Things are only free to the extent that you don't pay for them." </EM></FONT></DIV>
<DIV><FONT color=#33cc66></FONT></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>>From: Stephen Bond <STEPHEN@BONDSOFTWARE.CO.NZ>
<DIV></DIV>>Reply-To: accessd@databaseadvisors.com
<DIV></DIV>>To: accessd@databaseadvisors.com
<DIV></DIV>>Subject: RE: [AccessD] New ID/Autonumber value
<DIV></DIV>>Date: Wed, 07 May 2003 12:12:33 +1200
<DIV></DIV>>
<DIV></DIV>>Andrew, just to complete the knowledge flowing freely here (great stuff), if I've used a SQL statement to INSERT the new record, can I use @@Identity (and how)?
<DIV></DIV>>
<DIV></DIV>>Thanks
<DIV></DIV>>Stephen Bond
<DIV></DIV>>
<DIV></DIV>>-----Original Message-----
<DIV></DIV>>From: Haslett, Andrew [mailto:andrew.haslett@ilc.gov.au]
<DIV></DIV>>Sent: Wednesday, 7 May 2003 10:43 a.m.
<DIV></DIV>>To: 'accessd@databaseadvisors.com'
<DIV></DIV>>Subject: RE: [AccessD] New ID/Autonumber value
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>Jet 4.0 supports @@Identity. Therefore if you are inserting your record in
<DIV></DIV>>code using ADO then it will work fine.
<DIV></DIV>>
<DIV></DIV>>Cheers,
<DIV></DIV>>Andrew
<DIV></DIV>>
<DIV></DIV>>-----Original Message-----
<DIV></DIV>>From: Arthur Fuller [mailto:artful@rogers.com]
<DIV></DIV>>Sent: Wednesday, 7 May 2003 2:01 AM
<DIV></DIV>>To: accessd@databaseadvisors.com
<DIV></DIV>>Subject: RE: [AccessD] New ID/Autonumber value
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>I don't think that works in MDBs, which I assume Stephen meant, else he
<DIV></DIV>>would have posted on the SQL list.
<DIV></DIV>>
<DIV></DIV>>Arthur
<DIV></DIV>>
<DIV></DIV>>-----Original Message-----
<DIV></DIV>>From: accessd-bounces@databaseadvisors.com
<DIV></DIV>>[mailto:accessd-bounces@databaseadvisors.com] On Behalf Of Haslett, Andrew
<DIV></DIV>>Sent: May 6, 2003 12:09 AM
<DIV></DIV>>To: 'accessd@databaseadvisors.com'
<DIV></DIV>>Subject: RE: [AccessD] New ID/Autonumber value
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>SELECT @@IDENTITY
<DIV></DIV>>
<DIV></DIV>>-----Original Message-----
<DIV></DIV>>From: Stephen Bond [mailto:stephen@bondsoftware.co.nz]
<DIV></DIV>>Sent: Tuesday, 6 May 2003 12:23 PM
<DIV></DIV>>To: accessd@databaseadvisors.com
<DIV></DIV>>Subject: [AccessD] New ID/Autonumber value
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>In this thread a couple of months ago there was a solution offered to the
<DIV></DIV>>problem of determining the value of an ID Autonumber of a record just added.
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>It was stunning in its simplicity, so of course I didn't write it down ;-(
<DIV></DIV>>
<DIV></DIV>>Can anyone help?
<DIV></DIV>>
<DIV></DIV>>TIA
<DIV></DIV>>
<DIV></DIV>>Stephen Bond
<DIV></DIV>>Otatara, New Zealand
<DIV></DIV>>( tel 03 213 1256 fax 03 213 0123
<DIV></DIV>>_______________________________________________
<DIV></DIV>>AccessD mailing list
<DIV></DIV>>AccessD@databaseadvisors.com
<DIV></DIV>>http://databaseadvisors.com/mailman/listinfo/accessd
<DIV></DIV>>Website: http://www.databaseadvisors.com
<DIV></DIV>>
<DIV></DIV>>IMPORTANT - PLEASE READ ********************
<DIV></DIV>>This email and any files transmitted with it are confidential and may
<DIV></DIV>>contain information protected by law from disclosure.
<DIV></DIV>>If you have received this message in error, please notify the sender
<DIV></DIV>>immediately and delete this email from your system.
<DIV></DIV>>No warranty is given that this email or files, if attached to this
<DIV></DIV>>email, are free from computer viruses or other defects. They
<DIV></DIV>>are provided on the basis the user assumes all responsibility for
<DIV></DIV>>loss, damage or consequence resulting directly or indirectly from
<DIV></DIV>>their use, whether caused by the negligence of the sender or not.
<DIV></DIV>>_______________________________________________
<DIV></DIV>>AccessD mailing list
<DIV></DIV>>AccessD@databaseadvisors.com
<DIV></DIV>>http://databaseadvisors.com/mailman/listinfo/accessd
<DIV></DIV>>Website: http://www.databaseadvisors.com
<DIV></DIV>>
<DIV></DIV>>_______________________________________________
<DIV></DIV>>AccessD mailing list
<DIV></DIV>>AccessD@databaseadvisors.com
<DIV></DIV>>http://databaseadvisors.com/mailman/listinfo/accessd
<DIV></DIV>>Website: http://www.databaseadvisors.com
<DIV></DIV>>
<DIV></DIV>>IMPORTANT - PLEASE READ ********************
<DIV></DIV>>This email and any files transmitted with it are confidential and may
<DIV></DIV>>contain information protected by law from disclosure.
<DIV></DIV>>If you have received this message in error, please notify the sender
<DIV></DIV>>immediately and delete this email from your system.
<DIV></DIV>>No warranty is given that this email or files, if attached to this
<DIV></DIV>>email, are free from computer viruses or other defects. They
<DIV></DIV>>are provided on the basis the user assumes all responsibility for
<DIV></DIV>>loss, damage or consequence resulting directly or indirectly from
<DIV></DIV>>their use, whether caused by the negligence of the sender or not.
<DIV></DIV>>_______________________________________________
<DIV></DIV>>AccessD mailing list
<DIV></DIV>>AccessD@databaseadvisors.com
<DIV></DIV>>http://databaseadvisors.com/mailman/listinfo/accessd
<DIV></DIV>>Website: http://www.databaseadvisors.com
<DIV></DIV>>_______________________________________________
<DIV></DIV>>AccessD mailing list
<DIV></DIV>>AccessD@databaseadvisors.com
<DIV></DIV>>http://databaseadvisors.com/mailman/listinfo/accessd
<DIV></DIV>>Website: http://www.databaseadvisors.com
<DIV></DIV></div><br clear=all><hr>The new <a href="http://g.msn.com/8HMIENUS/2737??PS=">MSN 8:</a> smart spam protection and 2 months FREE* </html>