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.
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.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,
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.
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.
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?
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.
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?
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,
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.