Results 1 to 4 of 4
  1. #1
    anonymust's Avatar
    anonymust is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    Home
    Posts
    9

    AutoNumber Primary Key until manually entered


    Is it possible for me to have a data base with the primary key set as an Auto-Number BUT I can go back into the database and then change that number manually?

    Im creating a simple database of grocery items, and I want to make use of the barcodes on them, typing in the numbers will be a bit too much work for me, so i will be buying a barcode reader in the near future.

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,544
    Is it possible for me to have a data base with the primary key set as an Auto-Number BUT I can go back into the database and then change that number manually?
    No. Auto-Number makes an excellent PK but it can not represent anything that we humans can relate to. It will be unique but will not necessarily increment. It can decrease.
    You could just create a number type field in your table and use code in a forms Before Update event to find the highest number used, add one to that and save that as your PK number.

    Crossposted: http://www.access-programmers.co.uk/...d.php?t=264431

    Please read: http://www.excelguru.ca/content.php?...-cross-posters
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    anonymust's Avatar
    anonymust is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    Home
    Posts
    9
    Wait is accessforums.net/ and http://www.access-programmers.co.uk/ the same website?

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,726
    No. But many people frequent many sites.

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

Similar Threads

  1. Using AutoNumber primary key on sorted column
    By grkatz823 in forum Access
    Replies: 7
    Last Post: 03-04-2013, 03:47 PM
  2. Sequential autonumber primary key
    By JackCampion in forum Access
    Replies: 0
    Last Post: 09-17-2012, 05:07 PM
  3. Replies: 3
    Last Post: 03-11-2012, 08:20 AM
  4. Manually autonumber a field
    By apsf68 in forum Access
    Replies: 15
    Last Post: 11-13-2010, 04:04 PM
  5. Replies: 2
    Last Post: 04-30-2010, 09:43 AM

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