Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2002

    Cool Unanswered: Increment AutoNumber by ID


    I think I have an idea how to do this but I'm not sure.

    Basically, I have a form with attached subform that displays information about a particular ID. The Subform returns a view of all data in the table and the Form is only used to enter new records.

    In the table I have a field that I would like to autonumber by ID so that as a new record is added for an ID the number gets the max number for that ID and then increments by 1.

    For instance...

    ID: 111
    AutoNmb: 1

    ID: 111
    AutoNmb: 2
    Date: 11111901


    My initial idea was to query the table when the record updated and get the maxNmb for that ID then increment by one for that field but I'm not sure this is the best way and I'm worried about generating records with no data except for the autonumber.

    Any ideas or suggestions on how you would approach this?


  2. #2
    Join Date
    Jun 2004
    Florida, US
    why not use an autonumber field?

    edit: nevermind, didnt notice your example. but in mutliuser environments that might cause problems.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts