MoveLayout, NextRecord, PrintSection Properties

Applies To

Report.

Description

You can use combinations of these property settings in Visual Basic to specify or change a report’s layout when the report is previewed, printed, or saved to a file:

  • MoveLayout — This property specifies whether Microsoft Access should move to the next printing location on the page.
  • NextRecord — This property specifies whether a section should advance to the next record.
  • PrintSection — This property specifies whether a section should be printed on the page.

Setting

The MoveLayout property uses the following settings.

Setting

Description

True (-1)

(Default) The section’s Left and Top properties are advanced to the next print location.

False (0)

The section’s Left and Top properties are unchanged.


The NextRecord property uses the following settings.

Setting

Description

True

(Default) The section advances to the next record.

False

The section doesn’t advance to the next record.


The PrintSection property uses the following settings.

Setting

Description

True

(Default) The section is printed on the page.

False

The section isn’t printed.


To set these properties, specify a macro or event procedure for a section’s OnFormat property.

Microsoft Access sets these properties to True before each section’s Format event.

Remarks

These properties are useful when you want to use a report as a template into which you write data from a macro or Visual Basic as you print.

The following table shows the result of different setting combinations for these properties.

MoveLayout

NextRecord

PrintSection

Description

True

True

True

(Default) Move to the next print location, get the next record, and print the data.

True

False

True

Move to the next print location, don’t advance to the next record, but print the data. This combination is typically used when the data in a section requires more space than the layout allows and you want to print the remaining data in the space that would otherwise be occupied by the next section.

False

True

False

Skip a record without leaving a blank space on the page.


MoveLayout

NextRecord

PrintSection

Description

True

True

False

Skip a record and leave a blank space on the page.

True

False

False

Leave a blank space without skipping a record, as in a sparse matrix.

False

True

True

Print the current record on top of the last record as an overlay.

False

False

True

Not allowed.

False

False

False

Not allowed.


See Also

Event Properties; Format Event; Left, Top Properties; NewRowOrCol Property.