Results 1 to 5 of 5
  1. #1
    FriQenstein is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    98

    Control options for Exporting and Printing

    Greetings all,

    I'm nearing the end of my DB design and almost ready for roll out.

    I was asked if it would be possible to display certain information on a Report at times and not display it at other times.
    For example: Report for a list of inventory items has a category for Consignment. They only want the Consignment company listed for internal use and not for external use.


    So my Report has an Export to PDF button, and a Print button.

    What I'm wondering is, what is the best way to allow the user to choose whether or not to display the Consignment field on the report or export file? Should I use a check box on the Report, or a radio button, or should I just make additional buttons for Export and Print that allow the user to select if/when they want that Consignment value displayed?

    I'm not too familiar with using check boxes and radio buttons in Access, but I know what they are and how they work. I'm just looking for the simplest solution for this particular scenario.
    I'm guessing creating a second set of buttons would be easier, however I would then most likely l need to create a second Report that doesn't show the Consignee field. Just a simple copy and paste option with changes to the output fields should suffice I guess.

    Thoughts?
    Thanks.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You could probably make any of those options work, so whichever fits your app best. A second button wouldn't have to open a different report, it could pass something in OpenArgs. Code in the format event of the section containing that control can check a form or OpenArgs and hide/display that control as appropriate.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    FriQenstein is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    98
    I've added a Checkbox to the Report which allows the user to select/deselect the field using:
    Code:
    Private Sub ChkBox1_AfterUpdate()If Me.ChkBox1 = True Then
      Me.Consignee.Visible = True
      Me.Label11.Visible = True
    Else
      Me.Consignee.Visible = False
      Me.Label11.Visible = False
    End If
    End Sub
    This appears to be working so far.

    Thanks.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Okay. Holds that setting when you export or print?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    FriQenstein is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2019
    Posts
    98
    Indeed it does. I've tested it with the Export to PDF and in the Print Preview window... I haven't actually printed it yet, but the preview looks to be OK.

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

Similar Threads

  1. Sizing issues with Reports - Printing and Exporting
    By FriQenstein in forum Reports
    Replies: 1
    Last Post: 01-22-2019, 03:37 PM
  2. Printing Image in Webbrowser control
    By WAVP375 in forum Access
    Replies: 0
    Last Post: 07-11-2018, 09:09 AM
  3. Tab Control and Exporting to Excel
    By wtucker in forum Forms
    Replies: 1
    Last Post: 07-27-2017, 01:57 PM
  4. Replies: 8
    Last Post: 09-03-2015, 08:16 PM
  5. Replies: 2
    Last Post: 09-17-2014, 09:35 AM

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