Apr 21 2005, 04:51 AM
Can anyone point me in the right direction. I have a number of reports which I'd like to filter by a common dialog - how can I achieve this without putting loads of buttons on the dialog to launch the forms seperately.
Apr 21 2005, 05:11 AM
If I understand this correctly....howsabout a multi-select list box?
I'm not sure if you mean reports or forms but you could list your forms/reports in a list box and then highlight the required ones and have a button to launch them all at once.
Apr 21 2005, 05:20 AM
How I see it working is....
1. User selects the report from the Switchboard
2. The filter dialog launches
3. Filters are selected (client, category etc)
4. The appropriate report is displayed - filtered
Apr 21 2005, 05:35 AM
Ok, so you have the reports available on the main menu.
Select the report via a button. This opens a common generic dialog box with fields for all sorts of reports, which is unbound. Depending on which report you clicked you can set some of the irrelevant text boxes to be not visible or not enabled so that a user can only enter filter information in certain boxes.
Then use this data to filter the recordset (or indeed provide criteria for a query) and provide the report with the filtered data on.
A simpler option though - why can't you just put criteria in your query for each report that asks for input. Eg. [Please input client name]. If you wanted to use the unbound form you would set the query criteria to Forms!YourGenericFilterDialog!YourFieldName, where you change YourGenericFilterDialog and YourFieldName to suit.
Apr 21 2005, 08:19 AM
Ok, I understand how to get the report to look at the unbound fields on the dialog form, but what I don't know how to do is get the dialog to appear, after the report is selected, and then only open the required report.
Hope this makes sense!?
Apr 22 2005, 08:38 AM
Ok, presuming you're persisting with a common generic dialog box....
The easy way (and possibly a bit clunky) would be to create buttons for each and every report on the form and then depending on the report selected, make the appropriate button visible and the others not visible.
The other way would be to set the report name as a string variable when you select which report you want. Then use this string for the report to open when you've finished the dialog box.
StrValue = "Report Name"
You probably need to pass the string variable and I'm not too hot on that side of things. Maybe someone could suggest?
The simplest way, however, that does away with all this, is to have all your reports based on queries and just open the report via a button. There's no need to design a dialog box that way.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here