P
PDC
I have a problem with an Access report that I cannot solve. Can anyone help?
I am using Access 2003, and have been using and programming Access on and
off for many years.
The problem is with a fairly complex report, so I have created a stripped
down version that still exhibits the same behaviour, and it is this I
describe below.
There are 6 tables. I have joined 3 of the tables together in a query (Q1),
and the three other tables together in a second query (Q2). I have then
joined these two queries together into a third query Q3, which is the control
source for the report. This is a way of getting all the hierarchic
information about the detail records into one place.
The report has two sections only, and no special properties or events. The
detail section contains 10 text box controls, each of whose control source is
a field in Q3. The other section is a header section for the field X, on
which the report is grouped, and it contains 5 text box controls, all of
which depend on X. There is another field (Y – a Boolean) on which the
report is sorted, and Y depends on X.
When I run this report with the sort on Y after the sort/grouping of X then
I get the results I expect – group headers followed by detail records. If I
put Y above X (so the sort on Y comes before that on X, which is what I want
to do) then all the groups break up and the group header is printed above
each single detail record. It is this group break-up behaviour that I am
trying to cure. Bizarrely, if I then delete any single control from either
of the two sections the aberrant behaviour disappears.
Am I doing something wrong? Have I hit some limit in Access? Before I try
other ways to get round the problem, can you suggest any simple ways?
Thanks.
I am using Access 2003, and have been using and programming Access on and
off for many years.
The problem is with a fairly complex report, so I have created a stripped
down version that still exhibits the same behaviour, and it is this I
describe below.
There are 6 tables. I have joined 3 of the tables together in a query (Q1),
and the three other tables together in a second query (Q2). I have then
joined these two queries together into a third query Q3, which is the control
source for the report. This is a way of getting all the hierarchic
information about the detail records into one place.
The report has two sections only, and no special properties or events. The
detail section contains 10 text box controls, each of whose control source is
a field in Q3. The other section is a header section for the field X, on
which the report is grouped, and it contains 5 text box controls, all of
which depend on X. There is another field (Y – a Boolean) on which the
report is sorted, and Y depends on X.
When I run this report with the sort on Y after the sort/grouping of X then
I get the results I expect – group headers followed by detail records. If I
put Y above X (so the sort on Y comes before that on X, which is what I want
to do) then all the groups break up and the group header is printed above
each single detail record. It is this group break-up behaviour that I am
trying to cure. Bizarrely, if I then delete any single control from either
of the two sections the aberrant behaviour disappears.
Am I doing something wrong? Have I hit some limit in Access? Before I try
other ways to get round the problem, can you suggest any simple ways?
Thanks.