I think I've been trying to reinvent the wheel for about two days now.
Using a query (as opposed to a macro I'd have to run to update my table) I need to count how many entries in my db live in a particular state - and break these entries down into groups of, let's say 15, placing a corresponding number into a field. So, if "Springfield, IL" was the 14th occurrence (of "IL"), "Chicago, IL" was the fifteenth and "Indianapolis, IN" immediately followed those two, the third field I'd like to create would list out: IL-14, IL-15, IN-1. (Note the third starts back at "1")
Is there a function that I can use for this? I've spent the better part of two days trying to fashion something with dcount - and the best I've come up with is: Placement = DCount("[State]", "Pros", "[State] = '" & State & "'And" & "[Pros].[ID] < " & ID). This works by counting all occurrences of a particular state which have an ID lower than the present entry. The problem is, however, that because it's based on the ID order the entries get out of alphabetical order the moment I add an entry with a higher auto ID number. I'm going to try placing the table in alpha order, then manually adding a field of numbers - but this seems pretty barbaric.
Any thoughts?
Using a query (as opposed to a macro I'd have to run to update my table) I need to count how many entries in my db live in a particular state - and break these entries down into groups of, let's say 15, placing a corresponding number into a field. So, if "Springfield, IL" was the 14th occurrence (of "IL"), "Chicago, IL" was the fifteenth and "Indianapolis, IN" immediately followed those two, the third field I'd like to create would list out: IL-14, IL-15, IN-1. (Note the third starts back at "1")
Is there a function that I can use for this? I've spent the better part of two days trying to fashion something with dcount - and the best I've come up with is: Placement = DCount("[State]", "Pros", "[State] = '" & State & "'And" & "[Pros].[ID] < " & ID). This works by counting all occurrences of a particular state which have an ID lower than the present entry. The problem is, however, that because it's based on the ID order the entries get out of alphabetical order the moment I add an entry with a higher auto ID number. I'm going to try placing the table in alpha order, then manually adding a field of numbers - but this seems pretty barbaric.
Any thoughts?