Results 1 to 3 of 3
  1. #1
    npresadbukka is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2013
    Posts
    2

    Custom Autonumber based on lookup

    Custom Autonumber based on lookup

    I am creating an access database where autonumbers to be work.



    I have a table with Segment Name my main table will lookup the values of segment table.

    Based on the Segment I choose Autonumber has to be created

    My main table to house each record (tbl_import) has the following fields:

    ID
    Segment
    Port
    MOT
    TOTAL CIF

    Child table - Segment contains
    Development
    Deployment
    Testing


    So based on segment field which I choose

    Development autonumber has to set DEV-1001 and Deployment has to set DEP-2001, TEST-3001

    My thought is if there a way to code the Segment field to lookup the segment what I choose based on the Autonumber series starts (similar to a vlookup in excel), then concatenate the DEV in the Record ID field.

    Can someone help? I am not very good with VBA (can edit fairly well but not proficient at writing it)

    I appreciate any thoughts!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Creating custom unique ID is common topic. Search forum or google.

    Here is one: http://forums.aspfree.com/microsoft-...ta-403208.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. Autofill based on Autonumber Field?
    By W.Chan in forum Access
    Replies: 2
    Last Post: 12-06-2012, 10:51 PM
  2. Replies: 4
    Last Post: 11-15-2012, 09:33 AM
  3. Custom Autonumber based on lookup
    By luce725 in forum Access
    Replies: 7
    Last Post: 08-26-2011, 01:49 PM
  4. Replies: 1
    Last Post: 08-02-2011, 06:46 PM
  5. How to make a custom autonumber?
    By AccessThis in forum Access
    Replies: 1
    Last Post: 07-20-2010, 06:49 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