how to add sequential no's (autonumber) to a to field in a form

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neelsfer
    Contributor
    • Oct 2010
    • 547

    #1

    how to add sequential no's (autonumber) to a to field in a form

    I do timing of athletes.If athlete does 3 laps, then i want to add a no 1 into a field next to his first lap time, a number 2 in 2nd field next to 2nd lap time etc
    In other wards, i want to know what is the first lap time, the 2nd etc
    The program works with race no's. When i ads his race number to the application, press enter,then it calculates the finish time for me and should add a 1 or 2 or 3 in the finishseq field of the table etc for that specific laptime.

    mainform = cyclistF (table =cyclist)
    subform = RaceTimingSF
    Table = RacetimingT
    Fields
    RacetimingId (autonumber)
    RaceNo (number)
    Racedate (date)
    Racename (txt)
    FinishSeq (number)

    any help? plsss
  • neelsfer
    Contributor
    • Oct 2010
    • 547

    #2
    just fixed an error

    Comment

    • neelsfer
      Contributor
      • Oct 2010
      • 547

      #3
      mainform = racesetupf (table =racesetup)
      fields = racesetupid(aut ono)
      racename(txt); racedate(short)
      subform = RaceTimingSF

      Comment

      • neelsfer
        Contributor
        • Oct 2010
        • 547

        #4
        I got a sequential number to add to this table, using the Dmax function and using the BeforeInserteve nt of the form.

        Private Sub Form_BeforeInse rt(Cancel As Integer)
        FinishSeq = Nz(DMax("Finish Seq", "Racetiming T")) + 1
        End Sub
        The only problem is that when ie RaceNo = 10 is entered 3 times for the 3 laps done, then lap 1 must be 1 in finishseq table and 2 =2 and 3=3 and if another athlete's race no is typed in, then it must start again with 1 in the Finishseq table for 1st lap etc etc. How do i do that?

        Comment

        Working...