+ Reply to Thread
Results 1 to 4 of 4

Access - Sequence Number reset at each ID exchange

  1. #1
    Forum Contributor
    Join Date
    08-06-2007
    Posts
    105

    Access - Sequence Number reset at each ID exchange

    I have two tables - one with parent Records, the other with child records. The ID links the two tables together.

    I want to add a sequence number on the child table which resets at each ID change. What would be the best way to accomplish this?


    Please Login or Register  to view this content.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Access - Sequence Number reset at each ID exchange

    Hi adgjqetuo,

    I'd do this problem using Excel and the Countif function. See the attached for the formula. You should sort the excel sheet to help your numbering and then apply the formulas.
    Attached Files Attached Files
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor
    Join Date
    08-06-2007
    Posts
    105

    Re: Access - Sequence Number reset at each ID exchange

    Thank you for the reply - I can do it with Excel too, but I was hoping for a solution in Access. I want to automate the process fully through Access and this is the last portion I couldn't figure out.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Access - Sequence Number reset at each ID exchange

    Here is an example and VBA statement to achieve what you are looking for in ACCESS

    http://www.blueclaw-db.com/download/...nter_query.htm
    Last edited by alansidman; 11-19-2014 at 01:26 AM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Sorting the data with Exchange code for different months and paste it in sequence in next
    By boddulus in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-05-2014, 07:37 PM
  2. Replies: 6
    Last Post: 11-26-2013, 05:21 PM
  3. Replies: 5
    Last Post: 11-22-2010, 06:31 PM
  4. Exchange a number for a letter forumla
    By jasper1106 in forum Excel General
    Replies: 10
    Last Post: 08-08-2009, 04:59 PM
  5. How can I match a random number with closest number from sequence?
    By matt in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-02-2006, 08:25 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1