On Thu, 26 Aug 2004 06:49:01 -0700, "mei7511"
Yes; that's a lot more reasonable. You'll need to sort the records by
Cat and Class; a query
SELECT [Bill#], [Cat], [Class],
DCount("*", "[yourtable]", "[Bill#] = " & [Bill#]
AND [Class]*1000000 + [Cat] <= " & [Class] * 1000000 + Cat)
should get you this sequential number; you can change this to a
MakeTable or Append query to permanently store the "code".
John W. Vinson[MVP]
(no longer chatting for now)