NewRowOrCol Property

Applies To

Form Section, Report Section.

Description

You can use the NewRowOrCol property to specify whether a section and its associated data is printed in a new row or column within a multiple-column report. For example, you can use this property to print each group header at the top of a new column in a multiple-column report.

Note The NewRowOrCol property does not apply to page headers or page footers.

Setting

The NewRowOrCol property uses the following settings.


You can set this property using the section’s property sheet, a macro, or Visual Basic.

You can set the NewRowOrCol property only in report Design view.

Remarks

The following items are some sample settings for a group header section in a multiple-column report. The Layout Items option in the Layout tab of the Page Setup dialog box (available by clicking Page Setup on the File menu) should be set to Down, Then Across.


Report sections in a form or report are normally printed vertically down a page. The default Layout Items option is Across, Then Down. You can print the sections in multiple columns across a page by setting the Layout Items option in the Layout tab of the Page Setup dialog box to Down, Then Across.

When you set the NewRowOrCol property to Before Section, the vertical or horizontal orientation of the page affects how the section is printed. If you select Across, Then Down in the Layout Items option in the Layout tab of the Page Setup dialog box, Microsoft Access starts printing the section at the beginning of a new row; if you select Down, Then Across, Microsoft Access starts printing the section at the beginning of a new column.

See Also

Event Properties, ForceNewPage Property.

Example

The following example returns the NewRowOrCol property setting and assigns it to the intGetVal variable.


Dim intGetVal As Integer= Reports!MyReport.Section(1).NewRowOrCol

The next example presents two layouts for a report that divides data into four groups (Head1 to Head4). Each group includes three to six records, and each record has field a and field b. The layouts differ only in their Layout Items option in the Layout tab of the Page Setup dialog box and the values of their NewRowOrCol properties.

· Layout Items — Across, Then Down

· Grid Settings — Items Across set to 4

· NewRowOrCol property setting for group header section — Before & After

Head1

1a 1b 2a 2b 3a 3b 4a 4b 5a 5b

Head2

1a 1b 2a 2b 3a 3b 4a 4b

Head3

1a 1b 2a 2b 3a 3b

Head4

1a 1b 2a 2b 3a 3b 4a 4b

5a 5b 6a 6b

· Layout Items — Down, Then Across

· Grid Settings — Items Across set to 4

· NewRowOrCol property setting for group header section — Before Section

Head1 Head2 Head3 Head4

1a 1b 1a 1b 1a 1b 1a 1b

2a 2b 2a 2b 2a 2b 2a 2b

3a 3b 3a 3b 3a 3b 3a 3b

4a 4b 4a 4b 4a 4b

5a 5b 5a 5b

6a 6b