Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / September 2005

Tip: Looking for answers? Try searching our database.

Display Record Number

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MikeS - 01 Sep 2005 15:11 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.