Results 1 to 4 of 4
  1. #1
    elektrisk is offline Novice
    Windows 7 Access 2007
    Join Date
    Feb 2010
    Posts
    4

    Multiple "AutoNumber" attributes.

    Hello.


    I have a table that connects two other tables. This table contains two keys. I'd like to make both of them "AutoNumber". But, Access will only allow me to set one as "autonumber". How could I compensate for this?

    Thanks a thousand.

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    No, they're not autonumber fields, they are foreign keys and hence numeric (long integer) because they link to autonumber fields.

  3. #3
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    Access does not permit two autonumber fields in the same table. As you have found out.

    So that's the starting point - and it kind of begs the question as to why one ever needs two - - let's say they both are always generating the exact same ID - thus - what's the point of having this duplicate field.....??

    So whatever rationale you have for needing two - is wrong....

  4. #4
    maximus's Avatar
    maximus is offline Expert
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Aug 2009
    Location
    India
    Posts
    931
    I completely agree with NTC there is no possible reason on two autonumber fields in a single table. Never the less if you want to save the trouble of entering a number in a field use VB macro to solve your problem.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 21
    Last Post: 06-03-2009, 05:54 PM
  2. aSTR = Dir("C:\*.*") >> "Type Mismatch"
    By JGrant in forum Programming
    Replies: 1
    Last Post: 03-28-2009, 05:17 AM
  3. Export to .rtf of "104-" converts to "-655&qu
    By Sherri726 in forum Import/Export Data
    Replies: 0
    Last Post: 12-19-2006, 03:16 PM
  4. Replies: 2
    Last Post: 08-31-2006, 12:19 PM
  5. "Count" and "Countif" in Reports
    By JMantei in forum Reports
    Replies: 1
    Last Post: 06-20-2006, 02:20 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums