Results 1 to 2 of 2
  1. #1
    badmem is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Mar 2016
    Posts
    24

    Question Report grouping from combo-box query

    I have a report based on a query that prints records grouped by department. I changed the query to use combo-boxes to pick criteria. If the department field is blank all records are shown. After the change the report grouping no longer works - the report doesn't print each department on separate pages. How do I fix this?

    Thank you.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    i would use this code to open the report

    Code:
    if IsNull(me.combo) then
       docmd.openreport "myReport",acViewPreview
    else
         docmd.OpenReport "myReport",acViewPreview ,,"[field]='" & me.combo & "'"
    endif

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

Similar Threads

  1. Replies: 3
    Last Post: 02-08-2016, 02:22 PM
  2. Trying to remove grouping from query used in report
    By kattatonic1 in forum Queries
    Replies: 2
    Last Post: 11-04-2014, 02:15 PM
  3. Query/Report Record Grouping/Totaling
    By mikej2505 in forum Access
    Replies: 1
    Last Post: 10-04-2014, 10:29 AM
  4. Report Grouping
    By mountaindo in forum Reports
    Replies: 7
    Last Post: 04-08-2014, 03:19 PM
  5. Grouping in Report
    By New.Dimension6267 in forum Reports
    Replies: 1
    Last Post: 10-11-2013, 10:03 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