Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Location
    IL, USA
    Posts
    3

    Unanswered: Numbering of records in single form?

    Good day all,

    I am interested in displaying the number of the record currently displayed on a form in an " X of N " format. Does anyone now how to go about this? Thanks, Rich

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    If you turn the navigation buttons for the form on, you will see
    Record X of N on the buttom. Is there a reason you have those turned off?
    Inspiration Through Fermentation

  3. #3
    Join Date
    Sep 2003
    Location
    IL, USA
    Posts
    3
    Originally posted by RedNeckGeek
    If you turn the navigation buttons for the form on, you will see
    Record X of N on the buttom. Is there a reason you have those turned off?
    The application in question is a multiple choice test to be administered on computer. I have changed the display settings in order to fit all the necessary components on the screen without scrolling. As a result the nav buttons are really small. Additionally, this usage would probably require the test taker to have some level of familiarity with database navigation. The form displays the question, 4 possible reponses, grouped command buttons to select 1-4 as selected answer and possibly some directions. The test taker will also have command buttons for Next, Previous and to allow access to any appropriate attachments such as graphs, tables images or text blocks. I would just like a counter that displays to the test taker that they are on question 32 of 65. I really don't have any formal backround and am learning as I go - this is apparently more difficult than I anticipated. It seems that everything is set up to do this when you print, but not when displayed. Thanks for your time RNG.

  4. #4
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Put a new label somewhere on your form to hold "Question 1 of 10"
    Call it lblProgress for now.

    Since it doesn't look like the test will always have the same number
    of questions, you'll need to a few module level variable at the top of your form module...
    Dim intTotal as integer

    Then, in the forms On Load event, you'll need to get the total number of records for that instance, and store it in intTotal:

    intTotal = Me.RecordsetClone.RecordCount

    Then, in the forms On Current event, get the current record number:

    Dim intCurrent as integer, strCaption as string
    intCurrent=Me.CurrentRecord
    strCaption = "Question " & intCurrent & " of " & intTotal
    lblProgress.Caption =strCaption


    Hopefully, that's what you're looking for.
    Mark
    Inspiration Through Fermentation

  5. #5
    Join Date
    Aug 2003
    Location
    Delft, The Netherlands (EU)
    Posts
    447
    In a variation of RNG, use the event of record change, and display the AbsolutePosition and RecordCount properties of your recordset.
    Make everything as simple as possible, but not simpler! - A. Einstein
    DB Problems? DB Explorer, BTrieve Re-engineering, DB Conversions & ETL? Conversion Tool

  6. #6
    Join Date
    Sep 2003
    Location
    IL, USA
    Posts
    3
    Thanks for the ideas gentlemen, I will look into both. Have a good day.

    Rich

Posting Permissions

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