Results 1 to 3 of 3
  1. #1
    RandyP is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2014
    Posts
    2

    Help with Serial numbers table


    I need to automatically assign an alphanumeric serial number from a serial numbers table to another table. This is not an autonumber. This needs to occur on each new record, no duplicates allowed. I will populate the serial numbers table with virtually thousands of unique alphanumeric serial numbers such as C100001, C100002, C100003 and so on. I need to have the next serial number in order used on each new record.
    The other question is do I have to list each serial number individually or can I list a range of serial numbers such as C100001 to C200001. This would be much easier.
    Also, how do I accomplish this. Is there a sample database I can use to accomplish this. Thanks for any assistance. Randy

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Code:
    for i = 10000 to 20000
       vSer = "C" & i
       sSql = "append to tbl ([serial]) values ('" & vSer & "')"
    next

  3. #3
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    I don't have a 'serial numbers' table. I generate unique identifier when new record is initiated. This is a common topic in forum. Review https://www.accessforums.net/forms/a...ing-23329.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Replies: 2
    Last Post: 02-14-2014, 11:23 AM
  2. mutli serial numbers in one
    By wirelineuk in forum Queries
    Replies: 1
    Last Post: 10-11-2012, 01:26 PM
  3. Automatic Serial Numbers
    By Mitch87 in forum Access
    Replies: 9
    Last Post: 02-18-2010, 12:57 PM
  4. organizing serial numbers and quantities
    By Diomeneus in forum Access
    Replies: 0
    Last Post: 11-14-2008, 03:17 PM
  5. Replies: 5
    Last Post: 02-08-2006, 08:42 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