Consulting

Results 1 to 3 of 3

Thread: Display column totals in a split form datasheet

  1. #1
    VBAX Mentor Marcster's Avatar
    Joined
    Jun 2005
    Posts
    434
    Location

    Display column totals in a split form datasheet

    I have a split form with the Datasheet on the bottom of screen.
    When I view this form, on the in built default Access Ribbon
    there is a button: Home > Records > Totals
    When I click on this a Totals Row appears at bottom of datasheet.
    It is this controls action I'm trying to get at.
    As it seems that in RunTime mode, that option/code cannot be run.
    I've created a custom Ribbon:
    <group id ='GroupRecordsTotal'
    label='Totals'>
    <toggleButton idMso='RecordsTotals'
    size='large'/>
    </group>
    But although gives no error, doesn't work in runtime mode but does in a .accdb file.
    I can with VBA make the TotalsRow appear on a query datasheet output view:
    Dim db As DAO.Database
    Dim qd As DAO.QueryDef
    Set db = CurrentDb()
    Set qd = db.QueryDefs("QueryNameHere")
    qd.Properties("TotalsRow") = True

    In Help:
    Tables > Display column totals in a datasheet

    But how do I get to toggle this TotalsRow in RunTime mode?.

  2. #2
    VBAX Mentor Marcster's Avatar
    Joined
    Jun 2005
    Posts
    434
    Location
    After investigating this, it seems that this functionlity is disabled in runtime (.accdr) mode.

  3. #3
    VBAX Newbie
    Joined
    Oct 2016
    Posts
    3
    Location
    Hi Marcster

    Could you help me and precise me on which event do you set the code above?


    My context:

    A subform in datasheet mode which displays data from a query. But I have no idea where to add your code below:

    Dim db As DAO.Database
    Dim qd As DAO.QueryDef
    Set db = CurrentDb()
    Set qd = db.QueryDefs("QueryNameHere")
    qd.Properties("TotalsRow") = True
    Thanks by advance for your help

Posting Permissions

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