How do I display the current record number in a text box on a form. I don't
want to use the standard navigation buttons at the bottom of the form.
Can anyone assist me with this please?
Thanks in advance
Allen Browne - 01 Sep 2005 15:36 GMT
Try a text box with its Control Source set to::
=[Form].[CurrentRecord]
More info:
Numbering Entries in a Report or Form
at:
http://allenbrowne.com/casu-10.html

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> How do I display the current record number in a text box on a form. I
> don't
[quoted text clipped - 3 lines]
>
> Thanks in advance
Klatuu - 01 Sep 2005 15:38 GMT
The recordset will need to be opened as dbOpenDynaset.
Set rst = CurrentDb.OpenRecordset("MyTableName", dbOpenDynaset)
If rst.RecordCount <> 0 Then
rst.MoveLast
rst.MoveFirst
End If
lngCurrRec = rst.AbsolutePosition 'Shows current record number
Note this is 0 based. The first record will be 0 and the last record will
be Recordcount - 1
> How do I display the current record number in a text box on a form. I don't
> want to use the standard navigation buttons at the bottom of the form.
>
> Can anyone assist me with this please?
>
> Thanks in advance