Grouping on Report

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report that needs to be grouped but I don't want the same data
repeated constantly. My report shows:
Date Order# Items
05/01 12345 aaaaa
05/01 12345 bbbbb
05/01 12345 cccccc
05/01 67890 aaaaa
05/01 67890 bbbbb
05/01 67890 ddddd
05/02 12345 xxxxxx
05/02 12345 yyyyyy

I would like my report to display like this:
Date Order# Items
05/01 12345 aaaaa
bbbbb
cccccc
05/01 67890 aaaaa
bbbbb
ddddd
05/02 12345 xxxxxx
yyyyyy
 
Create a group heading on Date and Order#. Place these two fields into the
group header. Add code to the On Format event of this group header:

Me.MoveLayout = False
 
acon said:
I tried this and it says that the macro doesn't exist. What would I need in
the macro?

Sounds like you entered "Me.MoveLayout = False" directly in the OnFormat
property box. That's not how event code works. Only macro names and function
names can be entered there.

What you do for a code routine is enter "[Event Procedure]" (one of the drop
down choices) and then press the build [,,,] button to the right. That will
take you to the VBA code editor window with the cursor positioned between the
pre-made lines that define the event code procedure. Between those lines is
where you enter "Me.MoveLayout = False".
 
Thanks Rick.

--
Duane Hookom
MS Access MVP


Rick Brandt said:
acon said:
I tried this and it says that the macro doesn't exist. What would I need
in
the macro?

Sounds like you entered "Me.MoveLayout = False" directly in the OnFormat
property box. That's not how event code works. Only macro names and
function names can be entered there.

What you do for a code routine is enter "[Event Procedure]" (one of the
drop down choices) and then press the build [,,,] button to the right.
That will take you to the VBA code editor window with the cursor
positioned between the pre-made lines that define the event code
procedure. Between those lines is where you enter "Me.MoveLayout =
False".
 
Back
Top