AccpacActiveApp.Item
Retrieves an AccpacApplication object specified by its 0-based index in the collection, or by its two-letter application ID.
Function Item(Index As Variant) As AccpacApplication
Parameters
Index
[in] the 0-based index of the item in the collection, or the two-letter application ID
Return Value
Returns the AccpacApplication object corresponding to the supplied index.
Remarks
Because the Item method is the default method for this collection, you do not have to specify "Item." For example, the following syntax forms are interchangeable:
activeApp.Item(0)
activeApp(0)
activeApp.Item("name")
activeApp("name")
Example
The following example displays the version of Administrative Services
in a message box:
Dim Session As AccpacCOMAPI.AccpacSession
Set Session = CreateObject("ACCPAC.Session")
Session.Open "ADMIN", "ADMIN", "SAMLTD", Date, 0, ""
Dim mDBLinkSysRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkSysRW = Session.OpenDBLink(DBLINK_SYSTEM, DBLINK_FLAG_READWRITE)
MsgBox mDBLinkSysRW.GetActiveApp.Item("AS").PgmVer