Sorry, but that's not how autonumbers work. In fact, if you want guaranteed
sequential numbering, you shouldn't use an autonumber at all.
You'll have to "roll your own". What I've done is use a subform for the
individual tracks. In the Current event of that form, I have code that
determines the highest number used so far, and then increments it by one:
Dim intNextNumber
If Not IsNull(Me.Parent!txtDiscID) Then
If IsNull(Me!txtTrackID) Then
intNextNumber = Nz(DMax("TrackID", "Tracks", "DiscID = " &
Me.Parent!txtDiscID), 0) + 1
Me!txtTrackID = intNextNumber
End If
End If
txtDiscID is the name of the text box on the parent form that contains the
number of the CD, while txtTrackID is the name of the text box on the
subform where the TrackID is displayed.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
"a.p.mews" <a.******@btinternet.com> wrote in message
news:cv**********@sparta.btinternet.com...
Hi
I'm trying to build a database to hold a CD collection inputting to a
Form.
I enter the CD number - no problem there, but would then like to enter a
track number AND increase that number automatically each time after No1.
until I start another CD.
Can I do this automatically and then re-set itself to No 1 when going onto
the next CD record or do I ask the impossible?
Thanks
Alan