I want to have a counter in my continuous subform that will display entry number 1, 2, 3, ..., but I do not want to add any field into my table.

Currently, I use textbox inside my subform with control source:
=IIf(Nz([childKey])="",Null,(DCount("childKey","TableName","[childKey]<""" & [childKey] & """ AND [parentKey] = """ & [parentKey] & """")+1))

This works fine as long I always sort it in ascending order by childKey. Therefore, if user add new data, I always sort (requery) the subform again.

Is there any other method than can handle unsorted childKey also? Or any method that is more efficient?