Results 1 to 4 of 4
  1. #1
    samg2012 is offline Novice
    Windows Vista Access 2003
    Join Date
    Mar 2013
    Posts
    2

    Sub Records & Autonumbers

    Hey,



    After hoping google would be my friend, I've turned to you guys for help!

    I have a table that has an autonumber, but I need 'sub autonumbers'? within these records. Hope that makes sense. Like this:

    Record (Auto Number) 1
    Sub Record 1.1
    Sub Record 1.2
    Record (Auto Number) 2
    Sub Record 2.1
    Sub Record 2.2
    Sub Record 2.3

    In the example above I have tried to illustrate how I need the system to work, record 1 has two sub records under it and record 2 has 3.

    Am I going about this in the wrong way?
    Thanks

  2. #2
    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
    In plain English WHAT is a record and a subRecord? If the "autonumber" is for your use, you probably shouldn't be using an autonumber for that field.
    It's hard for a reader to know which is the right or wrong way to do anything. That is, until we understand what the "anything" really means, and preferably in simple plain English business terms.

  3. #3
    samg2012 is offline Novice
    Windows Vista Access 2003
    Join Date
    Mar 2013
    Posts
    2
    Apologies, I doubt I explained what Im trying to do very well. Let me try again:

    So I have a list of issues:

    Issue 1
    Issue 2
    Issue 3

    Inside these records (issues) I want to have updates, like this:
    Ref 1 Issue 1 Update 1
    Ref 2 Issue 1 Update 2
    Ref 3 Issue 1 Update 3
    Ref 4 Issue 2 Update 1
    Ref 5 Issue 2 Update 2

    Currently 'Ref' is numbered using an autonumber, and 'Issue' is linked to another table with issues as PK. I cannot find a way to get the 'update' to sequentially number.

    Thanks again

  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
    A general model of you situation would be 2 tables

    tblIssue------->tblIssueComment

    where tblIssue has fields

    IssueId PK
    IssueName
    IssueNotedDate
    IssueDescription

    and tblIssueComment has fields

    IssueCommentID PK
    IssueComment
    IssueCommentDate
    IssueCommentMadeBy
    IssueId Fk to tblIssue

    These would fit into a Form/Subform with tblIssue in the MainForm and tblIssueComment in the subform.
    The tables would be linked on IssueID
    You have to have an Issue, before you can add a comment.

    I'm not clear on why you need the numbers you seem to want.
    All comments can be associated with the right issue by means of IssueID.
    All comments can be sorted based on IssueCommentDate

    I have included an IssueCommentMadeBy to record the person's name if needed, but it may not be necessary.

    You could have an IssueNo which you control. Let's say you start with 1. It would be a different field than IssueID in my view. IssueId and IssueCommentId could/would be autonumbers.
    For the next sequential number, you would get the maximum currently assigned IssueNo and add 1 to it.

    You could have, but don't need in my view, an IssueCommentNo as well; and set up like IssueNo.

    There is a free video on form/subform at https://www.youtube.com/watch?v=YZKN_-P6wck

    Good luck

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

Similar Threads

  1. Replies: 3
    Last Post: 05-04-2012, 12:04 AM
  2. Autonumbers and Incremental Numbers
    By stacies in forum Access
    Replies: 2
    Last Post: 01-27-2012, 02:53 PM
  3. Fixing Negative Autonumbers
    By prophecym in forum Access
    Replies: 5
    Last Post: 02-03-2011, 03:48 PM
  4. re-autonumbers every year by access
    By migo702000 in forum Access
    Replies: 4
    Last Post: 09-20-2010, 11:31 AM
  5. AutoNumbers
    By remmons in forum Access
    Replies: 1
    Last Post: 01-30-2010, 01:39 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