Reporting Issue

pdevito3

Board Regular
Joined
Dec 17, 2013
Messages
246
Hey everyone,

So I have a switchboard on my main menu. One of the tabs on the switchboard is for my reports. I have a form on this switchboard where the end user clicks a button for each report and that report will be displayed via the "Browse To" function.

Note that the build is Switchboard Form (to select a report) > SubForm (to filter report data) > Report

Part of this filter functionality is displaying and modifying a label to show what is being filtered in the report. This is done using VBA with an "After Update" event. All of this works great.

My problem is that when I go to print, export, or email the report (this is the direct report, none of the other parent forms), my dynamic title doesn't carry through. For example, If I apply a filter between dates, a label will become visible on the report that will display the date range that the user is filtering by (this date range is added using VBA based on user input). When I go to print, export, or email the report, it will display the filtered results, BUT the label itself is not shown on the report.

I think this is because I am opening the report itself which is having Access just applying the query it is set at and, because the label is hidden by default with different text, it is then not showing. Regardless, I'm not quite sure how to fix this.

Any advise?
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi Paul,
Try putting the filter string into an unbound textbox in the subform (it can be hidden). Then, when you launch the report, hide the subform and use the textbox value in the header. Something like
=Forms!MyForm!MySubform.Form!Textbox

Denis
 
Upvote 0
Thanks, Denis. I came to a similar fix earlier today. I actually changed the label to a textbox, blended it to the background, and set the control source to the filter controls on the parent form instead of having the VBA fill it. Worked like a charm! Regardless, appreciate the input.
 
Upvote 0
Also, if anyone comes across this need, another solution would be to add any VBA you have as a public function and make that function the control source of a textbox. I needed to do this with one of my solutions where my formula was too complex for an iif.
 
Upvote 0

Forum statistics

Threads
1,213,484
Messages
6,113,927
Members
448,533
Latest member
thietbibeboiwasaco

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top