I am trying to format text that represents user defined "numbers" these numbers have text on the back end sometimes.
Here is some examples of these numbers, which is how they are stored:
1, 2, 3, 12, 12B, 15, 16, 20, 100, 156L
I want to format them based on how many records there are in the table. The table is called "Parcels" the numbers are in the field "ParcelNo" as text.
If there are up to nine records, then formated like this
1, 2, 3, 3B, 4, 5, 6, 7, 8, 9, 9B, 9D, 9G, etc.
If there are between 10 and 99 records, then formated like this:
01, 02, 02B, 02D, 03, 12, 12B, 15, 16, 20, etc.
If there are between 100 or more (there won't be more than 999) records, then formated like this:
001, 002, 002B, 002D, 003, 012, 012B, 015, 020, 100, 156L, etc.
I have scrapped together something that works in VBA, but would like to do it in a query and don't seem able to find out how to do so. Is it possible? I am trying to learn access as I go and appreciate your help.
Here is some examples of these numbers, which is how they are stored:
1, 2, 3, 12, 12B, 15, 16, 20, 100, 156L
I want to format them based on how many records there are in the table. The table is called "Parcels" the numbers are in the field "ParcelNo" as text.
If there are up to nine records, then formated like this
1, 2, 3, 3B, 4, 5, 6, 7, 8, 9, 9B, 9D, 9G, etc.
If there are between 10 and 99 records, then formated like this:
01, 02, 02B, 02D, 03, 12, 12B, 15, 16, 20, etc.
If there are between 100 or more (there won't be more than 999) records, then formated like this:
001, 002, 002B, 002D, 003, 012, 012B, 015, 020, 100, 156L, etc.
I have scrapped together something that works in VBA, but would like to do it in a query and don't seem able to find out how to do so. Is it possible? I am trying to learn access as I go and appreciate your help.
Comment