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

Unwanted Grouping in Access Reports

Status
Not open for further replies.

CGSB

Programmer
May 23, 2006
35
CA
Hello,

I created an report in access which uses the following query as the Record Source:

Code:
SELECT candidate.*, sys_gcdepts.name_e AS dept, enrolment.target
FROM sys_gcdepts INNER JOIN (candidate INNER JOIN enrolment ON candidate.file_no=enrolment.file_no) ON sys_gcdepts.dept_id=candidate.home_department
ORDER BY candidate.last_name, candidate.first_name;

In the Sorting and Grouping box, I put last_name and first_name (for some reason I have to put something in that box or I get an error).

Now, for some reason, the report groups on the dept field for an unknown reason. Please help! I don't want grouping to occur anywhere on this report.

If you need more information, please let me know.
 
The only way the report can group on dept (that I know of)
is if there is a field in the sorting/grouping box chosen to tell it to do so. Are there any group headers/footers visible?
If you cannot uncheck the field in the report, open the query using the query builder and see if the grouping option has been chosen and uncheck it if so. You should never have to put something in the sorting/grouping on the report to avoid an error, so something else is probably going on. If there is any code behind the report it can't hurt to post it back here .....

Did you hear about the Buddhist who refused Novocain during a root
canal? He wanted to transcend dental medication.
 
You can delete a sorting and grouping level. You can't just delete the text in the field/expression.

I would expect you want to sort by at least one field. You don't need to create group header or footer sections.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
the report groups on the dept field for an unknown reason
Just to clarify, is it grouping or sorting on the dept field?

Did you hear about the Buddhist who refused Novocain during a root
canal? He wanted to transcend dental medication.
 
It is grouping on the dept field. Here is an example of the report that is being produced:

name1 dept1 target1
name2 target2
name3 target3
name4 dept2 target4
name4 dept1 target4


In the above example, dept1 should be displayed once in the first 3 rows, but is only displayed in the first row. dept1 will then reappear again in other rows if dept2 appears after the first instance of dept1.
 
We need more information.
What are the expression in your Sorting And Grouping levels?

Do you display any group headers or footers?

Are all of these controls in the detail section?

Have you set the "Hide Duplicates" property to Yes? If so, is this what you want?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top