H
HanSolo
Could someone help me tweak my below function (that can be run via
query expression) so that it incrementally adds 1 to each row in a
given group?
I understand that the table autonumber feature accomplishes this, but
I'd like to do it via "function called by query expression" since I'll
need the flexibility to restart the incrementing based on groupings.
What I have below does not add incrementally, as such just adds 1 to
everything.
Public Function FIDAssigner(A)
intnumber = A
Select Case intnumber
Case 1
FIDAssigner = (A + 1)
Case 2
FIDAssigner = (A + 1)
Case 3
FIDAssigner = (A + 1)
Case 4
FIDAssigner = (A + 1)
End Select
End Function
query expression) so that it incrementally adds 1 to each row in a
given group?
I understand that the table autonumber feature accomplishes this, but
I'd like to do it via "function called by query expression" since I'll
need the flexibility to restart the incrementing based on groupings.
What I have below does not add incrementally, as such just adds 1 to
everything.
Public Function FIDAssigner(A)
intnumber = A
Select Case intnumber
Case 1
FIDAssigner = (A + 1)
Case 2
FIDAssigner = (A + 1)
Case 3
FIDAssigner = (A + 1)
Case 4
FIDAssigner = (A + 1)
End Select
End Function