Re: Finding a record number using SQL
- From: "Del Murray" <Del.Murray@xxxxxxxxxxxxxx>
- Date: Fri, 7 Dec 2007 16:52:00 -0600
In any DB you need a primary unique key. In Accesss you can use a "counter"
type large integer and the system will increment it for you. Include the
column defined as counter in your recordset. Then when you insert a record
and post it, the db will populate the field for you. You then do a "locate"
on the key. Something like this ...
disablecontrols
insert
fieldbyname('xxx').asstring = 'sometheing'
fieldbynaem('yyy').asfloat := 12345
post
savekey := fieldbyname('counterfield').asfloat
locate('counter', savekey,[])
enablecontrols
.
- Follow-Ups:
- Re: Finding a record number using SQL
- From: JTH
- Re: Finding a record number using SQL
- References:
- Finding a record number using SQL
- From: JTH
- Re: Finding a record number using SQL
- From: Del Murray
- Re: Finding a record number using SQL
- From: JTH
- Re: Finding a record number using SQL
- From: Bill Todd
- Re: Finding a record number using SQL
- From: JTH
- Finding a record number using SQL
- Prev by Date: Re: Finding a record number using SQL
- Next by Date: Re: Milliseconds to SQL Server DateTime
- Previous by thread: Re: Finding a record number using SQL
- Next by thread: Re: Finding a record number using SQL
- Index(es):