Results 1 to 5 of 5
  1. #1
    catluvr is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2018
    Location
    Kansas
    Posts
    87

    Question Best way to set a report option

    Hello All!

    I have an inventory report titled "KitchInv".

    Some of the inventory items are consumable, like trash bags, and others are (obviously) non-consumable like measuring cups. In the underlying table, there is a yes/no field called "Consumable".

    I know I can use VBA to change the font color of the consumable items to red while leaving the others black. I do this in the Detail On Format of the report.


    (I want the consumable items red on the report so the kitchen helper knows what needs to be counted on the last day of camp)

    However, sometimes I want to run the report with all the text black.

    What I would like to do is have a prompt when running the report asking if the items should be a different color.

    That way I can make changes to the report ... what I mean is that I did have two reports ... one that prints with all text black and the other that prints with the consumable items red using conditional formatting. I made changes to one report ... font size, spacing, etc. and then I have to change the other. I'd like one report.

    I can't add a parameter to the query ... can I? I wouldn't think that would work.

    Susie
    Kansas

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Probably could be made to work but don't recommend. Use a control on form for user input of preference. Code references that control in conditional structure.

    Can be done in Conditional Formatting instead of VBA.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    catluvr is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2018
    Location
    Kansas
    Posts
    87
    I do have a form with an option group to select if the report should be run with all black text or some text red. But how do I use the value of the option group to affect the conditional formatting of the report?

    Thanks!

    Susie

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    It's just rules in CF.

    EXPRESSION IS: Forms!formname!optiongroupname=1 this format

    EXPRESSION IS: Forms!formname!optiongroupname=2 this format
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    catluvr is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2018
    Location
    Kansas
    Posts
    87
    WOW! SO OBVIOUS! Thank you!

    Susie
    Kansas

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

Similar Threads

  1. Criteria option not appearing when creating report
    By PATRICKPBME in forum Reports
    Replies: 6
    Last Post: 07-05-2017, 07:12 AM
  2. option groups as criteria for a report
    By cfljanet in forum Access
    Replies: 10
    Last Post: 10-30-2013, 02:49 PM
  3. Run report based on Option and Combo Boxs
    By AussieGal in forum Access
    Replies: 3
    Last Post: 02-20-2013, 08:24 PM
  4. Option Group on a Report
    By Paul H in forum Reports
    Replies: 1
    Last Post: 10-21-2011, 01:09 PM
  5. Replies: 4
    Last Post: 06-13-2011, 08:43 PM

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