Swapping to a different Ispec involves one or two steps, depending on your application.
Firstly, you need to load the new Ispec object using the getIspec() method. This method returns a blank version of the Ispec. The object is created locally and no host interaction takes place. You can then complete all the fields yourself and send the Ispec to the host for processing, or you can call the loadIspec() method, which performs a Page 2 Recall of the Ispec and fill in all the fields with data from the application.
To recall an Ispec using a Page 2 command, use the following code:
Dim objIspec As Object Dim sIspecName as String ’Set the Ispec name sIspecName = "CUST" ’Create reference to new Ispec Set objIspec = mvarConnection.getispec(sIspecName) ’If we don"t have an object, then ’we supplied an invalid Ispec name If Not objIspec Is Nothing Then If mvarConnection.loadIspec(objIspec) = False Then MsgBox "Cannot load Ispec requested" Else ’Set current Ispec Set mvarCurrentIspec = objIspec End If Else MsgBox "Ispec name is invalid" End If