Previous Topic

Next Topic

Book Contents

Book Index

AddNewYear - MaxBasic Function

AddNewYear([YearName: String [,PeriodStyle: String [, PlusAdjustment: Boolean [, InitialStatus: String [, StartDate: Date [, EndDate: Date , [NumPeriods: Number]]]]]]])

Add a new year of periods.

AddNewYear function syntax has these named arguments:

Parameter

Description

YearName

Optional. Name for the added year. Defaults to "Year ending MMM YYYY".

PeriodStyle

Optional. Period style for the added year. Defaults to the Period Style in Company Settings.
PeriodStyle parameter can be one of the following:

"1"

12 Month

"2"

4/4/5 Week

"3"

4/5/4 Week

"4"

5/4/4 Week

"5"

52 Week

"6"

13 Period

"7"

Custom

"8"

Single Period

"9"

2 Period

"A"

6 Period

 

PlusAdjustment

Optional. Defaults to the Period Style in Company Settings.

InitialStatus

Optional.

 

"O"

Open (default)

"C"

Closed

 

StartDate

Optional. Will only be used by the function if it is a new company i.e no existing periods.

EndDate

Optional. Will only be used if PeriodStyle is Custom.

NumPeriods

Optional. Will only be used if PeriodStyle is Custom.

Usage:

AddNewYear("YearEnding Custom", "1", True, "O")

or

AddNewYear