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

Set ACCPAC finder Criteria during run - time 1

Status
Not open for further replies.

Boris10

IS-IT--Management
Jan 26, 2012
97
KE
I am using ACCPAC finder in one of my forms, i would like to programatically restrict search creteria (displayed in the finder window) when a user selects an option from a combobox.

E.G only display Contractor optional field values when contractor is selected in the combobox.

Would anyone have an idea? Thank you!
 
Thank you for the replies,
@Ettiene
I tried setting fnd.filter = "Contractor" in the my button click event(Finder). Note: "Contractor" is an optional field.
The results that i got are the same as those that did not have this code.
@Tuba
.ViewFinder.Filter was not recognzed.

The following is my code for the finder button:
Code:
Public Sub findOpt(view As String, keyvalue As String, textbox As String)
Set fnd = New AccpacFinder.ViewFinder
[highlight #8AE234]fnd.filter = "Contractor"[/highlight]
fnd.Session = AccpacSession
fnd.ViewID = view
fnd.DisplayFieldIDs = Array(1, 3, 4, 5, 8, 10, 11) ' Set the collumns that will be visible when finder is open
fnd.ReturnFieldIDs = Array(1, 2, 3, 4, 5, 6) 'set column ids when fetching the values
'fnd.filter = "" 'condition here
fnd.InitKeyType = USER_PASSING_INIT_KEY
fnd.InitKeyValue = keyvalue
fnd.AutoTabAway = False
If fnd.Finder = True Then
 'txtRequisition.SetFocus
 textbox = fnd.ReturnFieldValues(3) ' fetch the values e.g 1 = column#1
End If

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top