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
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 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 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.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.