Results 1 to 3 of 3
  1. #1
    bilalo is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    107

    Add button in report group header

    I have a report that shows orderNo and totalAmount in the group header and then shows the ordered items in the details section.
    I want to add a button in the group header for each order that has totalAmount < 10000 and hide the button for other orders.
    Where should I write this statement mybutton.visible = ([totalAmount ] < 10000) ?


    Which event allows changing the visibility of the button in a report? Load, current, format, paint , print, .....

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    You don't use buttons on reports.
    put it on a form to open the report needed.
    better: make a list box with various reports, the button would open the one selected.

  3. #3
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Not strictly true. You can use command buttons in reports but they only appear in report view.

    However whilst the button will appear repeatedly in the header section of each group, it is the same button.
    So any event procedure will affect each group.
    That means you cannot do what you are asking.
    You may be able to use conditional formatting to do something similar to your requirement.

    NOTE: The button(s) are hidden and not functional in print preview
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 12-10-2016, 11:57 PM
  2. Replies: 1
    Last Post: 04-06-2014, 10:58 AM
  3. Replies: 6
    Last Post: 03-26-2013, 12:17 PM
  4. Replies: 0
    Last Post: 02-25-2013, 04:43 PM
  5. columns for group detail but not group header?
    By Coolpapabell in forum Reports
    Replies: 0
    Last Post: 08-21-2009, 08:53 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums