Group By Assistance (1 Viewer)

access2010

Registered User.
Local time
Today, 04:00
Joined
Dec 26, 2009
Messages
1,019
Could we please receive your assistance in how to Group records in our Access 2003 Database?
for the combo box, PortfolioCode
for the combo box, Trade
for the combo box, Sector
and then Remove the grouping

Your assistance is appreciated.
Crystal
 

Attachments

  • Group_By=295.mdb
    416 KB · Views: 300

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 06:00
Joined
Feb 28, 2001
Messages
27,122
When you wish to group records for ANY query, you choose a particular field as the basis of the grouping and then in the SQL of the query, after the WHERE clause but before the semi-colon that should end all queries, include a GROUP BY basefield. If you are dealing with a combo box, the SQL is usually defined in the .RowSource property for that combo.

BUT... your question confuses me on one point and this WILL require clarification: "and then Remove the grouping" Why? Tell us in words what it is you wish to accomplish.

Having expressed concern over the form of the question, I'm now going to jump out on a limb here and GUESS that what you want might be found if you look up "cascading combo boxes" - which would be a way to refine the contents of the combo box through a SERIES of choices made one at a time. Which would have the effect of sequentiallly altering combo boxes to reduce the number of choices in the final box based on choices made for the previous boxes. AND once you "undo" the choices (perhaps by saving something and allowing the form to reset itself) then you would remove all of the groupings.
 
Last edited:

mike60smart

Registered User.
Local time
Today, 12:00
Joined
Aug 6, 2017
Messages
1,913
As The_Doc_Man says I believe you are talking about Cascading Combobox's.

When you select a Portfolio in Combobox 1 the 2nd Combobox would display only Trade Items associated with the Portfolio selected.

I this scenario correct ?
 

access2010

Registered User.
Local time
Today, 04:00
Joined
Dec 26, 2009
Messages
1,019
When you wish to group records for ANY query, you choose a particular field as the basis of the grouping and then in the SQL of the query, after the WHERE clause but before the semi-colon that should end all queries, include a GROUP BY basefield. If you are dealing with a combo box, the SQL is usually defined in the .RowSource property for that combo.

BUT... your question confuses me on one point and this WILL require clarification: "and then Remove the grouping" Why? Tell us in words what it is you wish to accomplish.

Having expressed concern over the form of the question, I'm now going to jump out on a limb here and GUESS that what you want might be found if you look up "cascading combo boxes" - which would be a way to refine the contents of the combo box through a SERIES of choices made one at a time. Which would have the effect of sequentiallly altering combo boxes to reduce the number of choices in the final box based on choices made for the previous boxes. AND once you "undo" the choices (perhaps by saving something and allowing the form to reset itself) then you would remove all of the groupings.
Thank you for your question.

We would like to only Group One column at a time, such as PortfoliioCode, then after we have updated our records, we would like to Click the Remove Filter button and the sorting would be undone.
The same Grouping then Remove Filter would occur for the other Columns.

Crystal
 

mike60smart

Registered User.
Local time
Today, 12:00
Joined
Aug 6, 2017
Messages
1,913
See the attached

In the Search Unbound Textbox type the filter required.

Use the Clear Search to remove the filter.
 

Attachments

  • Group_By=295.zip
    62.8 KB · Views: 342

access2010

Registered User.
Local time
Today, 04:00
Joined
Dec 26, 2009
Messages
1,019
See the attached

In the Search Unbound Textbox type the filter required.

Use the Clear Search to remove the filter.
P.E.R.F.E.C.T.
Can I use your system to add other goupings to the same form?

Thank you.
Crystal
 

Users who are viewing this thread

Top Bottom