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!

Header Problems 1

Status
Not open for further replies.

CantDo

Technical User
Jun 5, 2005
48
0
0
CA
Hi.

I have a report based on grouped records. By way of illustration, let's say the records conceptually look like the following:

Record 1 belongs to Group 1 with Option = False
Record 2 belongs to Group 1 with Option = False
Record 3 belongs to Group 1 with Option = True
Record 4 belongs to Group 1 with option = True
Record 5 belongs to Group 2 with Option = False
[etc....]


I'm trying to create a report that would show the following:

Group1 Header
Record 1
Record 2


Group1 Header
Record 3

Group1 Header
Record 4

Group2 Header
Record 5

In other words, I'm trying to repeat the Group Header for each set of records where Option is False and for each record where Option is True.

My report has Groupings set on both Group and Option.

What I'm getting now is:

Group1 Header
Record 1
Record 2


Group1 Header
Record 3
Record 4


Group2 Header
Record 5

Can anyone help me with this? All help is most appreciated. Thanks!
 
There has to be some other field that can differentiate record 3 from record 4. You can use an expression in your sorting and grouping like:
Level 1: [Group]
Level 2: =IIf([Option] = False,0,[Primary Key Field])

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]
 
Thanks! There was no need for another field -- your code worked perfectly! That's two I owe you.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top