I have a table that has the following fields:
Category
Subcategory
Page
I am creating an index from this table that is grouped by: Category
Subcategory
Page
So, I end up with multiple page numbers for each Category/ Subcategory . I would like to create page ranges from the list of pages (i.e., 1,2,3,4,7,8,10 would become 1-4, 7-8, 10).
I've done ths before in Excel by sorting the list of numbers, looping through and comparing them to see if they are in sequence and then appending them to a text string as appropriate. I don't know Access VBA as well, though. Can anybody provide me with a solution? Thanks!
Category
Subcategory
Page
I am creating an index from this table that is grouped by: Category
Subcategory
Page
So, I end up with multiple page numbers for each Category/ Subcategory . I would like to create page ranges from the list of pages (i.e., 1,2,3,4,7,8,10 would become 1-4, 7-8, 10).
I've done ths before in Excel by sorting the list of numbers, looping through and comparing them to see if they are in sequence and then appending them to a text string as appropriate. I don't know Access VBA as well, though. Can anybody provide me with a solution? Thanks!