View Full Version : Counting up


Chrisopia
01-29-2009, 06:25 AM
How does the index count up - it uses autonumber right?

How can I use autonumber on a query to count up, but not like 1,2,3,4,5... but it counts similar data, like A 1,2,3,4,5... B 1,2,3,4... etc...

does this make sense?


(see image for example)

Rabbie
01-29-2009, 07:02 AM
Unfortunately you can't do this with autonumber. You would need to write a VBA procedure that finds the next number for a given letter or gives 1 if this is first time a letter is used. You could also calculate the value using a query and a DMAX function.

Chrisopia
01-29-2009, 07:20 AM
oh thats good then - what does Dmax do? Ive been told about it before and looked into it but DMAX didn't look relevent?