Results 1 to 2 of 2
  1. #1
    Jenni_Velting is offline Novice
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2017
    Posts
    1

    Have a main ID # (primary key) and then create multiple sub ID's under the main ID (ex. ##-01, ##-02


    I have create a table with a list of projects, where the Project ID # is an auto number and is the primary key in the table. I would like to have a second table that holds individual tasks associated with each project. I am trying to have the Task ID = the Project ID and then -01, -02, -03, etc. consecutively for each project ID as new task records are created. Can someone help me to do this?

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    The most common solution is probably the DMax() method mentioned here:

    http://www.baldyweb.com/CustomAutonumber.htm

    In your case, the criteria would be on project ID. Also, I would only save the second part, since presumably the project ID is already a field. You can concatenate them for the user.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 10
    Last Post: 07-05-2017, 11:31 AM
  2. Replies: 1
    Last Post: 11-04-2015, 07:25 AM
  3. Replies: 2
    Last Post: 10-22-2014, 11:39 AM
  4. Replies: 1
    Last Post: 10-26-2012, 03:27 PM
  5. Linking tables to show primary key from main table
    By Mark_435 in forum Database Design
    Replies: 5
    Last Post: 01-12-2012, 09: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