Filtering a Report

forms_are_nightmares

Registered User.
Local time
Today, 13:00
Joined
Apr 5, 2010
Messages
71
Hello All,

Not sure this is possible, however, I'll ask it anyway.

I've created a form with several combo boxes which will act as filters on a report, i.e., AccountCmbo, StateCmbo, ManagerCmbo.

I also have a report whose first grouping is Account and another for State and a third for Manager. Essentially, they are the same report with the only difference being how they are grouped. So there are 3 buttons on the form; one for each report.

Is there a way to have the user dictate which grouping option they prefer. In other words, the user selects the Account, State, and Manager, then a window or dialog box or something pops up asking the user how they want the data grouped?

If so, can anyone point me in the appropriate direction.
 
Not a complete answer but..

Looks like your question is Grouping, not Filtering.

If the data selection buttons effect the datasource query criteria you have your choice of data resolved.

Then, if no better response is available, have three reports all using the same query but with different grouping options and these are your choices of report.

One form, one query but 3 reports.
 
That's where I am now: one form, one query, 3 reports.

I'll look at some of the grouping threads in here and see if there's something that might spark something.

Thanks
 
If you have the three grouping options and they work then your problem is setting the criteria for the query fields.

Are you saying your combo boxes don't work?
 
The combo boxes work fine. I was trying to be a bit clever.

Essentially, the user selects criteria from the combo boxes and there is a button on the form that opens the report. Since there are 3 reports, there are 3 buttons. I was looking to eliminate the one-to-one relationship to cut down on the number of buttons on the form.

Instead, I might use one button, that opens another small form where the user selects how they want the report sorted. If they choose A, then report A opens and so on. Might require some extra coding but I think I can achieve the overall goal.
 
Sounds like you know what you are doing.

VBA should easily give you an option to select which grouping you want and then run the report.
Still 3 reports but just one button.

Maybe If Then Else in response to a MsgBox
 
Yes, that's what I've settled with; a msg box with some If Then statments.

Thanks for walking through this with me as it gave me some good ideas as we went along.
 

Users who are viewing this thread

Back
Top Bottom