C
Craig
I'm using Access 2002. I'm passing the values 1 through
10 (or any combination of the values) to a function. So,
the function could get passed all the numbers 1 through
10, or 1 through 4, or 1, 3, 8, 9, 10 or any combination
of the numbers 1 through 10.
I'd like the function to be able to abbreviate where there
is an incremental range of numbers - for example: 1, 2,
3, 4, 5 would be returned as "1-5". 1, 2, 3, 8 would be
returned as "1-3, 8". 1, 3, 4, 5, 6, 10 would be returned
as "1, 3-6, 10". Etc.
I'm thinking that populating an array and working with the
elements of the array would be the way to go, here. I'm
not sure how to go about it, though.
Thanks for any and all help.
C
10 (or any combination of the values) to a function. So,
the function could get passed all the numbers 1 through
10, or 1 through 4, or 1, 3, 8, 9, 10 or any combination
of the numbers 1 through 10.
I'd like the function to be able to abbreviate where there
is an incremental range of numbers - for example: 1, 2,
3, 4, 5 would be returned as "1-5". 1, 2, 3, 8 would be
returned as "1-3, 8". 1, 3, 4, 5, 6, 10 would be returned
as "1, 3-6, 10". Etc.
I'm thinking that populating an array and working with the
elements of the array would be the way to go, here. I'm
not sure how to go about it, though.
Thanks for any and all help.
C