Grouping a report based upon a number expression

bearcub

Well-known Member
Joined
May 18, 2005
Messages
734
Office Version
  1. 365
  2. 2013
  3. 2010
  4. 2007
Platform
  1. Windows
I have a report that is grouped by "expression". Their are 4 groupings and each group has a number from 1 to 4. the first grouping is grouped by the expression "=4". The second grouping is grouped on the expression "=2". The 3rd grouping, the expression is "=3" and the 4th grouping is "=1".

How do you create these expressions so you can group on them. I thought that you group on fields (I'm new to Access) but you can apparently group on an expression.

In report view, the headers are labeled like this:
=4 Header
=2 Header
=3 Header
=1 Header

How does Access create these headers?


Thank you for your help,

Michael
 
Thank you for the information. It looks like I'm going to have to her come and show me what she did. It is really interesting she was able to do this. She did say it wasn't done in the report itself but done in the query or table which seems odd.

Michael
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
A query or table can have values that are grouped on. It can't have colors :cool:
 
Upvote 0
The thought occurred to me that she might have used the Wizard and applied a grouping without any values or fields. Is this possible? Or, can you manually create a grouping in the wizard by creating expressions?
 
Upvote 0
I haven't really used MSAccess reporting in the last 10 years. Back in those long forgotten times the wizard gave you fields to choose from, but not the ability to create expressions on the fly. But the fields you choose could easily be created in the query, so it would have been very easy to have an "expression" used for grouping. Expressions in a query are no different than fields. Select Product, Qty, Price, (Price * Qty) as Extended_Total is a query with an expression. But it would simply look like the Extended_Total field in a report. It may have been possible even back then, though.
 
Upvote 0
Oh, okay, I'll check this out, This is probably what she did
 
Upvote 0
I finally figured out what happened. She had created some query expressions (she had concatenated some address fields so it appeared in on cell) and for some reason the report when it was grouped didn't recognize the expression names. So, instead of calling it Mailing address, the group called it an expression. Is this possible?
 
Upvote 0
That seems possible to me, if not entirely clear as to why. Most databases will assign some kind of value to a column in a query that is not explicitly named - in this case, seems like the name is not getting picked up properly.
 
Upvote 0
Yes, those were my thoughts. The DB was created by an Admin who was learning as she went along and it's my assignment to recreate the DB following best practices. It has been interesting so far ...
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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