> Help me guys
> here is my sample code (vb 5)
> let say "custid" is a autonumber field.
> when I fire "data1.recordset.addnew" this field will increas by 1, right!
> My problem is, when I fire "data1.recordset.cancelupdate" and I want to set
> the "custid" back to the previous number so that when I add record again,
> the number won't jump. How can I do that ?
You can't. Autonumbers weren't meant to be "reused" once they've been
used. However, since autonumbers really are only there to be used as
unique IDs for Primary and Foreign Keys, and should never have any
meaning associated with them, that shouldn't be a problem.
--
Beer, Wine and Database Programming. What could be better?
Visit "Doug Steele's Beer and Programming Emporium"
http://webhome.idirect.com/~djsteele/