Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group By Parameter 1

Status
Not open for further replies.

Bodhi147

MIS
Jan 24, 2003
17
US
Intern who needs a little help,

I am trying to make some parameters in a query using Microsoft Access. Once the criteria is entered it populates a report. The first parameter I have working uses the "Between/And" function for a date range. This works great, but how can I add on a parameter that asks the user how they would like the report grouped by. There are two choices, by Doctor, or by Procedure.

Any help would really be appreciated.
 
Bod: As with anything in Access/vba, there are several ways you could do this, some slicker than others. One way is to just have a pop up message box in which the user selects the proper grouping and then open the appropriate Report (one drawback here is you have two Reports, not one). E.g.,

Msg = "Would you like this Report grouped by Doctor?"
Style = vbYesNo
Response = MsgBox(Msg, Style)
If Response = vbYes Then
'open Doctor grouping Report
Else
'open Procedure grouping Report
End If

...one way to do it. Another way is to just have an option group, with 2 radio buttons, each with a label stating "Group by Doctor", "Group by Procedure" and on the "AfterUpdate" event of the option group, open the appropriate Report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top