Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28
  1. #16
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249

    Quote Originally Posted by June7 View Post
    However, I tested button Click event to apply filter and it works.
    June7, would you mind sharing the code you used with the buttons to filter on the report?

  2. #17
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Hi, please have a look at the attached updated file. You can also do it without all the code by making the query that is the source of both the form and the report reference the two combos (using Like Forms!frmLabIssues_rpt & "*") then simply issue a requery.

    Cheers,
    Attached Files Attached Files
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  3. #18
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249
    Quote Originally Posted by Gicu View Post
    Hi, please have a look at the attached updated file. You can also do it without all the code by making the query that is the source of both the form and the report reference the two combos (using Like Forms!frmLabIssues_rpt & "*") then simply issue a requery.

    Cheers,
    Thanks Vlad. It will take me a bit to wade through all that code to see if I can figure out what it all means/does. Two things I did notice right away are that once you select a Lab or System filter, you cant' un-filter it unless you close the form and reopen it. The other thing is that the Open checkbox remembers the last state when the form is opened and closed. So if they close it with it checked, the next time it is opened that filter is already applied.

  4. #19
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    The open checkbox has a Default value of True, you can remove it if you want. The code doesn't use filters so you can't unfilter, you need to empty the combos and it will properly show you the records that apply (all for both empty). In some applications I add code to the double-click event of the combos to empty them (Me.cboLab=Null) and requery.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  5. #20
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249
    Quote Originally Posted by Gicu View Post
    The open checkbox has a Default value of True, you can remove it if you want. The code doesn't use filters so you can't unfilter, you need to empty the combos and it will properly show you the records that apply (all for both empty). In some applications I add code to the double-click event of the combos to empty them (Me.cboLab=Null) and requery.

    Cheers,
    When I remove the True default value from the chkOpenOnly object on the frmLabIssues_rpt , the form opens with the checkbox filled (like a radial button) and filters the results as if it was selected. If you click on it, it turns to a check mark with the filter still there. If you click on it a second time, it clears the box and removes the filter.

    As to clearing the comboboxes, how would I go about adding an "All" selection for them to fix. I'm afraid that deleting the text out of the combobox is not going to be readily apparent for my users.

  6. #21
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Can have a button "Clear Filter" then code resets controls to Null.

    I already showed code for setting Filter and FilterOn properties.
    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.

  7. #22
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249
    Quote Originally Posted by Gicu View Post
    Hi, please have a look at the attached updated file. You can also do it without all the code by making the query that is the source of both the form and the report reference the two combos (using Like Forms!frmLabIssues_rpt & "*") then simply issue a requery.

    Cheers,
    Vlad, I'm having an issue with not all of the text being shown in the frmLabIssues_rpt for Issue, Impact, and Resolution. I've set all three of those to Yes for Can Grow, but only roughly the first 25 characters are being shown. Any thoughts on how I can get the row to become taller to show all the text as needed?

  8. #23
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Is the section set to grow? Does the report's source (query) return all the characters?

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  9. #24
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249
    Quote Originally Posted by Gicu View Post
    Is the section set to grow? Does the report's source (query) return all the characters?

    Cheers,
    Each section is set to Can Grow in both the report and the form. If I open just the report via the navigation pane, all the text is displayed for those sections. But when the report is displayed on the form (in continuous view), those do not grow to show everything.

  10. #25
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    I see, this is normal Access behavior, the report won't grow when used as a subform. Save it as a form and adjust the controls height and widths to give you what you want then replace it in the main form.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  11. #26
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249
    Quote Originally Posted by Gicu View Post
    I see, this is normal Access behavior, the report won't grow when used as a subform. Save it as a form and adjust the controls height and widths to give you what you want then replace it in the main form.

    Cheers,
    Sorry Vlad, I'm not sure I'm following what you are suggesting. I have my frmLabIssues that has the all of the input controls and text boxes, then I have the frmLabIssues_rpt form that displays all the issues via the rptLabIssues_sub. Which one are you suggesting that I change and include in the main form?

  12. #27
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Just had a look at the frmLabIssues_rpt and that is the one that needs adjusting, form controls don't grow like the report ones (they can with a bit of VBA - check this out please:https://accessdatabasetutorial.com/microsoft-access-tutorial-how-to-resize-form-fields-dynamically/).

    Easiest would be to make all the controls tall/wide enough so they show all the data.

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  13. #28
    Etoimos is offline Competent Performer
    Windows 7 64bit Access 2016
    Join Date
    Mar 2020
    Posts
    249
    Thanks Vlad. I'll play around with that. The problem I see is those field could be virtually unlimited in size or next to nothing bases on how much info someone types up about the issue. I'll have to watch that video at home some time as it is blocked here at work.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Storing filtered reports
    By CJ_London in forum Forum Suggestions
    Replies: 5
    Last Post: 09-18-2020, 05:42 AM
  2. Allow user to create custom, filtered reports
    By zzzjoshzzz in forum Access
    Replies: 5
    Last Post: 05-01-2015, 12:33 PM
  3. Reports filtered by Month
    By Douglasrac in forum Access
    Replies: 3
    Last Post: 01-27-2011, 05:01 PM
  4. Can't keep dates filtered on my reports!
    By Mr. Coffee in forum Queries
    Replies: 5
    Last Post: 12-02-2010, 11:27 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