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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping list of numbers 1

Status
Not open for further replies.

lamaar

Technical User
Jun 29, 2000
392
GB
If I have a field where the contents are numbers, 1-12, how can I group these on a report so that they show in quarters. Sorting and greouping does not work, neither does GroupOn.

Thanks
Lamaar75@hotmail.com
 
Hi,
Is this a month field? If so, is it designated as such in the table? I am asking because Access reports will let you group by quarter, but only if it is a date field.
HTH,
Randy Smith
California Teachers Association
 
Nope, the data is pulled from an SQL database and translates as number (1-12). It does represent the months of the year. I was aware that you can group by quarter on a date/time field but as this is a number field then I cannot figure out how to do it. Do you know of a way to translate the number into a month?

I tried a IIf statement in order to group so that the title would reflect certain months but it displays 1st Quarter for number 1,2 and 3 instead of just 1, then 4 then 7 etc.
Lamaar75@hotmail.com
 
Make sure you have a query for the report record source....in the query, put the following in the first blank field and change the [field] to [yourfieldname]:

IIF([field]=1 Or [field]=2 Or [field]=3, 1, IIF([field]=4 Or [field]=5 Or [Field]=6, 2, IIF([field]=7 Or [field]=8 Or [field]=9, 3, 4)))

Then include this field in your report and group by it.... Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. (Albert Einstein)

Robert L. Johnson III, MCP, Network+, A+
Access Developer/Programmer
robert.l.johnson.iii@citigroup.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top