CasewareDocs

SetFolderPeriod

Some audits like tax and statutory audits are done for a specific period and require the data from these periods. Now it is possible to enter the period for each audit test requiring a period. SmartAnalyzer also offers another possibility: the global period parameters. This kind of parameter can be specified for a folder and/or for a database. If you set a period for a folder, this period will apply to all databases within this folder except for the databases for which a specific period was set on database level.

With SetFolderPeriod you can set a period for all folders in a directory. Use SetFilePeriod to set the period for a single folder. The period set for a single folder has priority over the period set for all folders in the directory.

Compatibility

Available as of IDEA version 9.2

Syntax

SetFolderPeriod(folderName as String, from as Date, to as Date)

Parameters

folderName

The name of the folder.

from

The start date of the period.

to

The end date of the period.

The folder names may be absolute as well as relative to project folder. An empty folder name (null or "") designates the current project's root folder.The date values may not be null.

Example

Sub Main 
Dim SimpleCommands As Object
Dim mc As Object
Dim dbName As String
Dim startDate As Date
Dim toDate As Date

Set mc = SmartContext.MacroCommands
Set SimpleCommands = mc.SimpleCommands

startDate = DateSerial(2013,1,1)
toDate = DateSerial(2013,12,31)
SimpleCommands.SetFolderPeriod("FinAcc_2013", startDate, toDate)
End Sub