• Navigation controls (XP)

    Author
    Topic
    #394547

    I am working on some forms and trying to make them look better & be more

    Viewing 1 reply thread
    Author
    Replies
    • #724027

      You can place a textbox on the form with control source

      =”Record ” & [CurrentRecord] & ” of ” & [RecordSet].[RecordCount]

      • #724148

        Thank you Hans, perfect solution.

        • #724154

          A follow-up question. I am dealing with sub forms that have a parent child relationship with the main form. In other words, the main form may show 5 records but each of those 5 records may have several “sub records”. For example, Job 1 has A, B, C, D, and E sub jobs. In total, the 5 main records (jobs) contain 25 sub records (sub jobs). I would like for my sub form to display 1 of 5 but instead, it shows 1 in 25, 2 in 25, etc.

          Is there a way for me to limit the record count to only those records within a “family”?

          • #724156

            If I link the subform correctly to the main form, the number of records in the subform is displayed correctly; it is updated automatically when I move to another record in the main form. However, the current record number in the subform is not kept up to date; this can be remedied by putting an invisible unbound text box on the subform, and putting code in the On Current event of the subform that sets the value of this textbox to Me.CurrentRecord. This forces Access to keep track of CurrentRecord in the subform.

            • #724160

              Quite right. I realize now that I was looking at the form in isolation – it does work correctly. Sorry about that.

            • #724161

              Quite right. I realize now that I was looking at the form in isolation – it does work correctly. Sorry about that.

          • #724157

            If I link the subform correctly to the main form, the number of records in the subform is displayed correctly; it is updated automatically when I move to another record in the main form. However, the current record number in the subform is not kept up to date; this can be remedied by putting an invisible unbound text box on the subform, and putting code in the On Current event of the subform that sets the value of this textbox to Me.CurrentRecord. This forces Access to keep track of CurrentRecord in the subform.

        • #724155

          A follow-up question. I am dealing with sub forms that have a parent child relationship with the main form. In other words, the main form may show 5 records but each of those 5 records may have several “sub records”. For example, Job 1 has A, B, C, D, and E sub jobs. In total, the 5 main records (jobs) contain 25 sub records (sub jobs). I would like for my sub form to display 1 of 5 but instead, it shows 1 in 25, 2 in 25, etc.

          Is there a way for me to limit the record count to only those records within a “family”?

      • #724149

        Thank you Hans, perfect solution.

    • #724028

      You can place a textbox on the form with control source

      =”Record ” & [CurrentRecord] & ” of ” & [RecordSet].[RecordCount]

    Viewing 1 reply thread
    Reply To: Navigation controls (XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: