NewRowOrCol Property Example

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

Dim intGetVal As Integer
intGetVal = Me.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 settings under Column Layout on the Columns tab of the Page Setup dialog box and the values of their NewRowOrCol properties. Note that the Width box under Column Size on the Columns tab must be set to the actual width of the field. Also, the Before Section setting of the NewRowOrCol property requires a page header section greater than zero for the Down, Then Across option to function correctly.

  • Column Layout — Across, Then Down

    Head1

    1a 1b2a 2b3a 3b4a 4b

    5a 5b

    Head2

    1a 1b2a 2b3a 3b4a 4b

    Head3

    1a 1b2a 2b3a 3b

    Head4

    1a 1b2a 2b3a 3b4a 4b

    5a 5b6a 6b

  • Grid Settings — Number of Columns set to 4

  • NewRowOrCol property setting for group header section — Before & After
  • Column Layout — Down, Then Across

    Head1Head2Head3Head4

    1a 1b1a 1b1a 1b1a 1b

    2a 2b2a 2b2a 2b2a 2b

    3a 3b3a 3b3a 3b3a 3b

    4a 4b4a 4b4a 4b

    5a 5b5a 5b

    6a 6b

  • Grid Settings — Number of Columns set to 4

  • NewRowOrCol property setting for group header section — Before Section