[AccessD] New ID/Autonumber value

Andy Lacey andy at minstersystems.co.uk
Tue May 6 16:35:19 CDT 2003


Ok that's two things I learned today. Must be good. Thanks again.

Andy Lacey
http://www.minstersystems.co.uk



> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com 
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of 
> Charlotte Foust
> Sent: 06 May 2003 22:28
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] New ID/Autonumber value
> 
> 
> No, because that autonumber will still be assigned, there 
> just won't be a record to attach to it.  You can't do 
> anything with it until the record's been saved, but you can 
> store it in a variable for later use.
> 
> Charlotte Foust
> 
> -----Original Message-----
> From: Andy Lacey [mailto:andy at minstersystems.co.uk] 
> Sent: Tuesday, May 06, 2003 1:05 PM
> To: accessd at databaseadvisors.com
> Subject: RE: [AccessD] New ID/Autonumber value
> 
> 
> Problem if the .update fails?
> 
> Andy Lacey
> http://www.minstersystems.co.uk
> 
> 
> 
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com
> > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> > Mike and Doris Manning
> > Sent: 06 May 2003 21:33
> > To: accessd at databaseadvisors.com
> > Subject: RE: [AccessD] New ID/Autonumber value
> > 
> > 
> > The best place to grab it right after the .AddNew
> > 
> > Doris Manning
> > Database Administrator
> > Hargrove Inc.
> > www.hargroveinc.com
> > 
> > 
> > -----Original Message-----
> > From: accessd-bounces at databaseadvisors.com
> > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of 
> Andy Lacey
> > Sent: Tuesday, May 06, 2003 3:37 PM
> > To: accessd at databaseadvisors.com
> > Subject: RE: [AccessD] New ID/Autonumber value
> > 
> > 
> > Sorry to disagree Drew but I think it's
> > 
> > rs.AddNew
> > rs!Myfield="Test"
> > etc
> > etc
> > rs.Update
> > rs.bookmark=rs.lastmodified
> > msgbox rs!MyAutoNumber
> > rs.close
> > 
> > I think you have to do the .bookmark line. Without that 
> you're not on 
> > the right record
> > 
> > 
> > Andy Lacey
> > http://www.minstersystems.co.uk
> > 
> > 
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: accessd-bounces at databaseadvisors.com
> > > [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of
> > Drew Wutka
> > > Sent: 06 May 2003 17:05
> > > To: 'accessd at databaseadvisors.com'
> > > Subject: RE: [AccessD] New ID/Autonumber value
> > > 
> > > 
> > > dim rs as recordset
> > > rs.AddNew
> > > rs.Field(1).value="Test"
> > > rs.Update
> > > msgbox rs.Field(0).value
> > > rs.close
> > > 
> > > 
> > > As soon as you update the new record, the Autonumber field is 
> > > populated. (in my sample code above, the ID/AN is field 0).
> > > 
> > > Drew
> > > 
> > > -----Original Message-----
> > > From: Stephen Bond [mailto:stephen at bondsoftware.co.nz]
> > > Sent: Monday, May 05, 2003 9:53 PM
> > > To: accessd at databaseadvisors.com
> > > Subject: [AccessD] New ID/Autonumber value
> > > 
> > > 
> > > In this thread a couple of months ago there was a solution
> > offered to
> > > the problem of determining the value of an ID Autonumber of
> > a record
> > > just added.
> > > 
> > > 
> > > It was stunning in its simplicity, so of course I didn't
> > write it down
> > > ;-(
> > > 
> > > Can anyone help?
> > > 
> > > TIA
> > > 
> > > Stephen Bond
> > > Otatara, New Zealand 
> > > ( tel 03 213 1256   fax 03 213 0123 
> > > _______________________________________________
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com
> > > http://databaseadvisors.com/mailman/listinfo/a> ccessd
> > > Website:
> > > http://www.databaseadvisors.com 
> > > _______________________________________________
> > > AccessD mailing list
> > > AccessD at databaseadvisors.com 
> > > http://databaseadvisors.com/mailman/listinfo/a> ccessd
> > > Website: 
> > > http://www.databaseadvisors.com
> > > 
> > > 
> > 
> > _______________________________________________
> > AccessD mailing list
> > AccessD at databaseadvisors.com 
> > http://databaseadvisors.com/mailman/listinfo/a> ccessd
> > Website:
> > http://www.databaseadvisors.com
> > 
> > 
> > _______________________________________________
> > AccessD mailing list
> > AccessD at databaseadvisors.com 
> > http://databaseadvisors.com/mailman/listinfo/a> ccessd
> > Website:
> > http://www.databaseadvisors.com
> > 
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/a> ccessd
> Website: 
> http://www.databaseadvisors.com 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/a> ccessd
> Website: 
> http://www.databaseadvisors.com
> 
> 



More information about the AccessD mailing list