How to show groups of 10 records on a continuous form?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gerry Goldberg
    New Member
    • Jul 2010
    • 11

    How to show groups of 10 records on a continuous form?

    I want to show a table on a continuous form 10 records at a time. I want to be able to update a single field in the currently displayed group of records, and then scroll to the next group.

    I'm not sure where to start. Can you help?

    Thanks,

    Gerry Goldberg
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    The "easy" way is to use a subform 10 rows in hight. By clicking in the scroll bar below the "ruler" the subform will jump 10 rows down, etc.

    When you want this controlled by code it's a bit more work...

    Nic;o)

    Comment

    • Gerry Goldberg
      New Member
      • Jul 2010
      • 11

      #3
      How to show groups of 10 records on a continuous form?

      I think that will work ok. Now, if I want to update the same field (with the same value) on each of the records that are showing, how do I do that with VBA?

      Thanks,

      Gerry Goldberg

      Comment

      • nico5038
        Recognized Expert Specialist
        • Nov 2006
        • 3080

        #4
        No VBA needed, just an UPDATE query will do the trick like:

        Code:
        UPDATE tblTest SET Columnfield1 = 1
        Nic;o)

        Comment

        • Gerry Goldberg
          New Member
          • Jul 2010
          • 11

          #5
          Thanks for your quick response!

          Your example shows an Update query to update the data in my continuous subform. Since I only want to update those records currently being displayed, I wondered if the query would limit itself to those records, or try to update the entire table. I need to affect only the records being displayed.

          Thanks

          Comment

          • nico5038
            Recognized Expert Specialist
            • Nov 2006
            • 3080

            #6
            This will be harder and will require some VBA coding.

            I've attached a sample that's holding code that shows how selected rows on a datasheet can be processed (the sample shows the fields at the bottom and can be transformed to an UPDATE query with a WHERE clause).
            Looks to me more versatile to be able to select a range instead of all rows of the subform, but that decision is up to you :-)

            Let me know what you think of this.

            Nic;o)
            Attached Files

            Comment

            Working...