Results 1 to 5 of 5
  1. #1
    aonsu209 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2014
    Location
    Rotterdam
    Posts
    24

    Custom grouping of a query records

    Dear all,



    I'm making budget report for the company that I work as engineer not IT. Therefore I'm not so good with programming, but I can handle some. I need to create two types of budget reports. For one of the type I need to create a custom group query (see picture below). Is that possible and if it is any suggestions? (In my mind is something as extra calculated columns in the query and group it by them)
    Click image for larger version. 

Name:	access1.jpg 
Views:	10 
Size:	108.5 KB 
ID:	21364

    For the second type the problems are two I still need to group it, but also is a crosstab query and I need to fix the columns if I want it as subform. But on the way of working always should show the latest week, which means I can't fix the columns.
    Click image for larger version. 

Name:	access 2.jpg 
Views:	10 
Size:	100.5 KB 
ID:	21365

    Thank you in advance!
    Attached Thumbnails Attached Thumbnails access.jpg  

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    These reports can be made via CROSSTAB queries.
    tho yours are a bit complex, it can be done.
    you may have to post various crossatabs to a 'report' table, then run the report.

  3. #3
    aonsu209 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2014
    Location
    Rotterdam
    Posts
    24
    Thanks I get the idea, but what about for the second type, the crosstab query(subform) always need fixed column headings although there is a variable?

  4. #4
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    the 'report' table, would have these columns. Various append queries would add records to this table into their respective columns.

  5. #5
    aonsu209 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2014
    Location
    Rotterdam
    Posts
    24
    Quote Originally Posted by ranman256 View Post
    the 'report' table, would have these columns. Various append queries would add records to this table into their respective columns.
    Thank you so far with your input I'm trying it now. But I met another difficulty, I want to create a query with if statement, that should select tha last two records only. And because is in if statement I can use the option SELECT TOP2.. .I add row number to help me out, but still I need help how to do this if statement.
    Click image for larger version. 

Name:	access 3.jpg 
Views:	6 
Size:	117.3 KB 
ID:	21372
    What I want is something like that: rownumber: IIf([rownumber]<=3,[rownumber]=1,Sum([rownumber]-2)).
    If the rownumber is smaller or equal to 3 rows to show the first row if it is not true to sum all the raws excluding the last two.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Limiting records in a report after grouping
    By Berlioz in forum Reports
    Replies: 8
    Last Post: 04-03-2014, 11:16 PM
  2. Custom Grouping if field contains value
    By mrslaurabelle in forum Reports
    Replies: 1
    Last Post: 12-11-2013, 03:15 PM
  3. Grouping Records
    By Lowell in forum Access
    Replies: 1
    Last Post: 09-17-2012, 09:50 PM
  4. Trouble with suming, grouping records
    By mrfixit1170 in forum Programming
    Replies: 1
    Last Post: 02-09-2012, 01:41 PM
  5. Replies: 3
    Last Post: 09-01-2011, 11:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums