Results 1 to 6 of 6

Thread: Count (2003)

  1. #1
    3 Star Lounger
    Join Date
    Jul 2008
    Location
    Suffolk, United Kingdom
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Count (2003)

    Hi,

    I am try to display in a textbox the current record and total record. In the following format 56 / 1500

    So far I have: =Count([CRN]) & " " & ??????????????

    Can anyone help with the ??????????? bit

    Many thanks

    Kevin
    Regards
    Gerbil (AKA Kevin)

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

    Re: Count (2003)

    That information is already displayed in the navigation buttons section at the bottom of the form isn't it? Why display it in a text box?

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Count (2003)

    This code in the oncurrent event will do what you want.

    Me!txtRecordNumber = [CurrentRecord] & "/" & Me.Recordset.RecordCount
    Where txtRecordNumber is the name of the text box. Earlier versions of Access let you set the Control Source of the text box directly, but for some reason this is regarded as a security risk now.

    I would only do this is if I had hidden the navigation buttons for some reason, as the same info is already there.
    Attached Images Attached Images
    Regards
    John



  4. #4
    3 Star Lounger
    Join Date
    Jul 2008
    Location
    Suffolk, United Kingdom
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Count (2003)

    Many thanks,

    I have hidden the navigation buttons, I just don't like their look, plus I have other events attached to my own navigation buttons.

    Many thanks for this I thought it was [currentrecord] except I was typing =([CurrentRecord])

    Thank you
    Kevin
    Regards
    Gerbil (AKA Kevin)

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

    Re: Count (2003)

    Keep in mind that using an expression involving Recordset may cause problems for some users - see the thread starting at <post:=626,455>post 626,455</post:>.

  6. #6
    3 Star Lounger
    Join Date
    Jul 2008
    Location
    Suffolk, United Kingdom
    Posts
    308
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Count (2003)

    Thanks Hans that was useful

    In this instance I am using an anbound text box. and VBA to populate the data.

    Thanks
    Kevin
    Regards
    Gerbil (AKA Kevin)

Posting Permissions

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