PDA

View Full Version : Solved: Show a line number in a continuous form



Joe Heym
02-10-2006, 03:43 PM
I'm sure there is a simple answer to this but I can't find it. Please can you help?

I have a continuous form showing many records and I want to show a number against each record starting at one and incrementing by one. If I delete a record out of the middle of the recordset I want the numbers to reorder and not to skip by one.

Thanks in advance

Joe

geekgirlau
02-12-2006, 07:47 AM
You need a calculated field where the Control Source is


=DCount("[MyField]","MyTable","[ID]<=" & [ID])


This assumes that the field [ID] is unique and sorted in ascending order. You would also need to requery the form if a record is deleted.

Joe Heym
02-15-2006, 03:41 AM
Many thanks. After a few adaptations I got this to work.