Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Jul 2005
    Location
    North Carolina, USA
    Posts
    195
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Display a current page and total record count (2003)

    I am trying to use a text box to display the current record number and the total record count, kind of like the navigation bar at the bottom of the form. I want the info to display inside the form so I could remove the navigation bar. Apreciate any help.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Display a current page and total record count (2003)

    You can set the Control Source of the text box to

    ="Record " & [CurrentRecord] & " of " & [RecordsetClone].[RecordCount]

  3. #3
    2 Star Lounger
    Join Date
    Jul 2005
    Location
    North Carolina, USA
    Posts
    195
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Display a current page and total record count (2003)

    I am try the code by a message show up after I go to form view (#NAME?) do I have to put one of the table field in the code.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Display a current page and total record count (2003)

    Try this instead:
    - Replace the text box with a label lblRecord.
    - Put the following code in the On Current event of the form:

    Private Sub Form_Current()
    Me.lblRecord.Caption = "Record " & Me.CurrentRecord & " of " & _
    Me.RecordsetClone.RecordCount
    End Sub

    If that doesn't work either, see <post:=542,436>post 542,436</post:>. To make the code from that post work, you must set a reference to the Microsoft DAO 3.6 Object Library in Tools | References... (in the Visual Basic Editor).

  5. #5
    2 Star Lounger
    Join Date
    Jul 2005
    Location
    North Carolina, USA
    Posts
    195
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Display a current page and total record count (2003)

    You did it again. Thank Hans

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •