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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open UI + scroll

Status
Not open for further replies.

zalke

Programmer
Sep 11, 2003
7
US
Hello all
I would like to ask the professionals here in this group how to open up an accpac 5.1 form (e.g. PO Entry) and scroll it to a specific record (PO #) Using VB
Thanks in advance
Solomon
 
Add a reference to the ACCPAC xAPI 1.1 library.

Create and open a session object. See thread631-583563 and thread631-538503 for examples.

Code will be basically as follows.

Dim myPOnumber as string
Dim POPOR As ACCPACXAPILib.xapiView

myPOnumber=???
Set POPOR = Session.OpenView("PO0620", "PO")
With POPOR
.Browse "PONUMBER = " & myPOnumber & "", True
If .Fetch Then
Debug.Print .Fields("PORHSEQ").value
Debug.Print .Fields("PONUMBER").value
Debug.Print .Fields("DATE").value
...
End If
.Cancel
End With
Set POPOR = Nothing

Thanks and Good Luck!

zemp
 
Thanks zemp for the info
But what i need is to display the accpac UI and then scroll to the PO i want.
The code you wrote just opens the underlying dataset not the form
Solomon
 
I don't know of any way that you can get access to a specific ACCPAC form from VB.

Through the VB xAPI you would need to create your own form to display the information.



Thanks and Good Luck!

zemp
 
I have added a new FAQ faq631-4231 to demonstrate what you want to do in VBA macro.
In this thread thread631-660336, sixtyone provided sample codes for opening ACCPACCOMAPI sessions in VB.
Combining the two piece of information you should be able to do what you want in just a few lines of code.

------------
rvspy@nospam.htomail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top