Shame you can't use SQL as you wouldn't have to make 2 hits to the database
then.  You could look at the 'Inserted' table after adding the record

-----Original Message-----
From: Jim Mixon [mailto:[EMAIL PROTECTED]]
Sent: 03 August 2000 15:32
To: [EMAIL PROTECTED]
Subject: Re: Access AutoiNumber Fields



<CFTRANSACTION>
<CFINSERT table="name" DATASOURCE="name">
<CFQUERY NAME="name" DATASOURCE="name">
    select Max(id) as NewID
    from TABLENAME
</CFQUERY>
</CFTRANSACTION>

New Record ID = name.NewID



>How do you get the value used by Access in an AutoNumber field.  For
>example, you insert a record into one table and then, within the same
>template, need to use the ID assigned to that record.
>
>
>
>***************************************
>Jonathan R. Karlen
>Karlen Internet Solutions
>Web Site and Application Development
>[EMAIL PROTECTED]
>http://www.karlen.com
>
>
>------=_NextPart_000_0004_01BFFD33.9974EEC0
>Content-Type: text/html;
>         charset="iso-8859-1"
>Content-Transfer-Encoding: quoted-printable
>
>xmlns:w=3D"urn:schemas-microsoft-com:office:word" = 
>xmlns=3D"http://www.w3.org/TR/REC-html40">
>
>How do you get the value used by Access in an AutoNumber field.
>
>
>
>
>
>
>
>***************************************<= /p>
>
>Jonathan R. Karlen<= /p>
>
>Karlen Internet Solutions<= /p>
>
>Web Site and Application = Development<= /p>
>
>[EMAIL PROTECTED]<= /p>
>
>http://www.karlen.com<= /p>
>
>  <= /p>
>
>------=_NextPart_000_0004_01BFFD33.9974EEC0--
>
>---------------------------------------------------------------------------
---
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>To Unsubscribe visit 
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or 
>send a message to [EMAIL PROTECTED] with 'unsubscribe' in 
>the body.

Jim Mixon - CEO
APT POINT NET, Inc. "A Premiere InterNET Gateway" . . .
[EMAIL PROTECTED]   http://www.apt.net/
8405 NW 53 St.  Miami, FL 33166  305-418-4111
FAX (305) 418-4111 press 7 and SEND!
powered by Cold Fusion 4.01 . . . . feel the force!
CF Hosting Now Available . . . . !  
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebarRsts&bodyRsts/cf_talk or send a message 
to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to