Results 1 to 7 of 7
  1. #1
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Cool Unanswered: add autonumber to query

    is there any way that I can create an autonumber in a query so that it basically creates a unique key next to each record?

    thanks in advance
    ActionAnt

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    I think it is not possible

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1

    Lightbulb

    But you can use a Create Table Query and put your data in a table. Later you can use Alter Table to add new Auto Filed to the Created Table

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by hammbakka
    I think it is not possible
    Not quite ... How about something close??? Say a global function with a static variable that returns N+1 ... The only issue would be if the the "autonumber" needed to be reset ...
    Back to Access ... ADO is not the way to go for speed ...

  5. #5
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178
    I decided to make an apend table query and then just create the ID-Autonumber field in the table and then run the append query
    that worked fine

  6. #6
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Quote Originally Posted by M Owen
    Not quite ... How about something close??? Say a global function with a static variable that returns N+1 ... The only issue would be if the the "autonumber" needed to be reset ...
    That is also a good Idea, by the way what are the limits of Static Variables?

  7. #7
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by hammbakka
    That is also a good Idea, by the way what are the limits of Static Variables?
    Depends on the type Hammy ... Obviously if you use say a Long then you have 2 billion plus to work with ...
    Back to Access ... ADO is not the way to go for speed ...

Posting Permissions

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