caret
Vendor
- Nov 12, 2012
- 7
Hi there. New to this site (as a member, at least). Just wondering if anyone has encountered what I'm up against:
For some reason I can't get the AccpacFinder to work in VB.NET (on a Windoze 7, 64 bit w/s, incidentally). I gives me a not so helpful "Error HRESULT E_FAIL has been returned from a call to a COM component." This code works fine in VBA (and VB6, if I recall). This is Accpac v5.5 SP2... I know, out of date, but that's what my client is using.
Public Sub StartFinder()
Dim f As New AccpacFinder.ViewFinder
Dim arr(1) As Array ' new
f.Session = Session ' AccpacSession
f.ViewID = "AR0032"
f.Filter = "TEXTTRX=1"
f.ReturnFieldIDs = 1 ' System.Array(1) ' arr(1)
If f.Finder = True Then Form1.txIDINVC.Text = f.ReturnKeyValues ' <-- This is where it errors out.
' A problem with the result
' f.Finder returns?
End Sub
Thoughts?
For some reason I can't get the AccpacFinder to work in VB.NET (on a Windoze 7, 64 bit w/s, incidentally). I gives me a not so helpful "Error HRESULT E_FAIL has been returned from a call to a COM component." This code works fine in VBA (and VB6, if I recall). This is Accpac v5.5 SP2... I know, out of date, but that's what my client is using.
Public Sub StartFinder()
Dim f As New AccpacFinder.ViewFinder
Dim arr(1) As Array ' new
f.Session = Session ' AccpacSession
f.ViewID = "AR0032"
f.Filter = "TEXTTRX=1"
f.ReturnFieldIDs = 1 ' System.Array(1) ' arr(1)
If f.Finder = True Then Form1.txIDINVC.Text = f.ReturnKeyValues ' <-- This is where it errors out.
' A problem with the result
' f.Finder returns?
End Sub
Thoughts?