Here is an example of the basic VB code that I use to get information on a specified customer. I often use a modular or global level session object. When opening the session object, 'Date' is the VB Date() function that returns the current system date. Make sure that it is within the Accpac session date for the company. For example SAMINC session date is 2010, so you will get an error unless you change your computers system date. Probably easier to use a different company.
I use the actual view names for my variables just to keep thing clear and readable months down the road. You can use whatever variable names you wish.
Dim Session As ACCPACXAPILib.xapiSession
Dim ARCUSTOMER As ACCPACXAPILib.xapiView
Dim ARCUSTOMERFields As ACCPACXAPILib.xapiFields
Set Session = CreateObject("ACCPAC.xapisession"

Session.Open "ADMIN", "ADMIN", "SAMINC", Date, 0
Set ARCUSTOMER = Session.OpenView("AR0024", "AR"

Set ARCUSTOMERFields = ARCUSTOMER.Fields
ARCUSTOMER.Init
ARCUSTOMER.Order = 0
ARCUSTOMER.Browse "IDCUST = " & Trim(txtCustID.Text) & "", True
If ARCUSTOMER.Fetch Then
Text1.Text = Trim(ARCUSTOMER.Fields("NAMECUST"

.Value)
Text2.Text = Trim(ARCUSTOMER.Fields("TEXTSTRE1"

.Value)
Text3.Text = Trim(ARCUSTOMER.Fields("TEXTSTRE2"

.Value)
Text4.Text = Trim(ARCUSTOMER.Fields("NAMECITY"

.Value)
Text5.Text = Trim(ARCUSTOMER.Fields("CODESTTE"

.Value)
Text6.Text = Trim(ARCUSTOMER.Fields("CODECTRY"

.Value)
Text7.Text = Trim(ARCUSTOMER.Fields("CODEPSTL"

.Value)
Text8.Text = Trim(ARCUSTOMER.Fields("TEXTPHON1"

.Value)
Text9.Text = Trim(.ARCUSTOMER.Fields("TEXTPHON2"

.Value)
Text10.Text = Trim(ARCUSTOMER.Fields("NAMECTAC"

.Value)
Else
MsgBox "Customer could not be found."
End If
ARCUSTOMER.Cancel
ARCUSTOMER is a simple view. With views that have headers and multiple details you will also need to compose the views so that the header and details 'talk' to each other properly. You can see how they are composed in the macros and just cut and paste the lines used to compose the views to your VB code. Changing any variable names as necessary.
Thanks and Good Luck!
zemp