Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening View in VBscript

Status
Not open for further replies.

NeilN

IS-IT--Management
Jun 16, 2004
24
CA
What's the proper syntax for opening a view with COMAPI and VBScript?

This works in VBA:
Dim mDBLinkCmpRW As AccpacCOMAPI.AccpacDBLink
Set mDBLinkCmpRW = accsession.OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
Dim ARCUSTOMER1 As AccpacCOMAPI.AccpacView
mDBLinkCmpRW.OpenView "AR0024", ARCUSTOMER1

But this throws a "Type mismatch: OpenView was not handled" error in VBScript.

Set accSession = CreateObject("Accpac.Session")
accSession.Init "", "AS", "AS1000", "52A"
accSession.Open "ADMIN", "TEST", "TSTDAT", Date, 0, ""

Set mDBLinkCmpRW = accSession.OpenDBLink(DBLINK_COMPANY, DBLINK_FLG_READWRITE)
Set mDBLinkSysRW = accSession.OpenDBLink(DBLINK_SYSTEM, DBLINK_FLG_READWRITE)
mDBLinkCmpRW.OpenView "AR0024", ARCUSTOMER1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top