'Global VariablesDim mSession as New AccpacSessionDim Sessionmgr as new AccpacSessionManagerDim ObjectHand as StringDim mDbLink as AccpacDBLink'Open Session:Private sub Form_Load()'Open SessionWith SessionMgr .AppId="XX" .AppVersion="56A" .ProgramName="XX1000" .ServerName="" .CreateObjectHandle(ObjectHand,0,mSession)End WithIf mSession.isOpened then Set mDbLink=mSession.OpenDBLink(DBLinkType.Company,DBLinkFlags.ReadWrite)End if 'Initialize Views With adsView1 if .Active=false then .DBLink=mDbLink .Active=true End if End With With adsView2 if .Active=false then .DBLink=mDbLink .Active=true End if End With With adsView3 if .Active=false then .DBLink=mDbLink .Active=true End if End With With adsView4 if .Active=false then .DBLink=mDbLink .Active=true End if End WithEnd Sub