Results 1 to 9 of 9

Thread: Total records

  1. #1
    Join Date
    May 2008
    Location
    London
    Posts
    25

    Unanswered: Total records

    Does anyone know if you can show the total number of records that you get on the navigation at the bottom of a form in a text box on the form i want to get rid of the navigation

  2. #2
    Join Date
    Jul 2004
    Location
    South Dakota
    Posts
    267
    You should be able to use the RecordCount property of the recordset that the form is bound to. To make sure that it displays the correct number you will need to use the MoveLast method of the recordset to make sure that it's fully populated.

    C

  3. #3
    Join Date
    May 2008
    Location
    London
    Posts
    25
    the form in question is made from an sql querie and am not sure about the recordset property is that a standard property in access

  4. #4
    Join Date
    May 2008
    Location
    London
    Posts
    25
    i have found a way of doing this

    =Count([mp3id])

    where mp3id is the key field and changes for each recordset returned

    I am now trying to show the current record number if anyone can help

  5. #5
    Join Date
    Jul 2004
    Location
    South Dakota
    Posts
    267
    colinod--

    Yes recordset is a standard property in Access. I would set this number in a textbox through VBA code. How familiar with VBA are you? I'm guessing not very much and that's OK...we all start somewhere!

    Let me know how comfortable you are with writing code and we'll work on getting this thing fixed for you.

    C

  6. #6
    Join Date
    Jul 2004
    Location
    South Dakota
    Posts
    267
    colinod--

    For a non VBA solution you code just put "=[CurrentRecord]" in for the ControlSource of the textbox and that should display the number of the current record.

    C

  7. #7
    Join Date
    May 2008
    Location
    London
    Posts
    25
    im not brilliant writing VBA although i can get my head around something thats aready been written

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    why do you feel the need to display the number of records.... does it have an y meaning or true value to your users, or is it something that you do because Access displays it be default.

    the record count property of a recordset should give you what you want.. but you will need to do a ".movefirst" & ".movelast" to populate it.
    you could issue a sql select count() if you wantred to and display the value from that if you wanted to.

    I see these sort of record counters quite often, but always wonder why they are there.. most users don't give a flying whatever, but often its seen as somethign you (as a developer) must have.
    I'd rather be riding on the Tiger 800 or the Norton

  9. #9
    Join Date
    May 2008
    Location
    London
    Posts
    25
    The reason for the count is that the database will search over 3000 mp3 files and we want to know how many are returned in the search, but i just dont like the access version at the bottom

Posting Permissions

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