Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Posts
    18

    Unanswered: Hide group footer

    My access report has a group footer that is hidden if the sum of amtFld is=0. This is defined in group header as me.Amt=sum([amtFld]. But the amtFld could either be SalaryAmt or HrsWrk depending on the selection criteria for the report. I tried using Me!Amt.controSource ="=sum(choose(" & criteria & ",[SalaryAmt],[HrsWrk]) but it's giving out error 2191 "You can't set ControlSource property in print preview or after the printing has starting". What's the best way to resolve this issue? Thanks.

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Why not just
    Code:
    Me.Amt.ControlSource = "=Sum([" & criteria & "])"
    in the On Open event procedure of the report.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Jun 2004
    Posts
    18

    Hide group footer

    Thanks, StarTrekker.
    Actually the choose formula works but I just moved it to On Open event as you suggested. Thanks again.

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    No problem, happy to help
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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