Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi!
I have a data model loaded which consists of individuals and their attributes - first name, last name, company, dob, individual ID, etc....
I'm attempting to make a search-like function using macros where a user inputs a a variable into an input box and clicks a button.
This button will search for that variable in the data set and will return a match. For example, if the user inputs 'Robert' as the search variable, the vba/macro search the data model and return the search results (searching each field):
- fName lName
- James Roberts
- Robert Williams
Is this possible to do with Qlikview / VBA?
Can you use the built in Search Object instead of a macro for this?
-Rob
The end users would like an input box with a button... which in turn will produce the search results.
So far, I have this code but it currently only searches 1 field:
Sub SelectVar
ActiveDocument.Fields("Field").Clear
set vSel = ActiveDocument.Variables("vSearchName")
ActiveDocument.Fields("Field").Select vSel.GetContent.String
End sub
"The end users would like an input box with a button"
Isn't that what a search object is? (minus the button)
I understand what your suggestion is... the search box. What I'm saying is I'm looking for another alternative other than the search box which is an input box, a button with VBA code in the background.
Got it. What you can do with the macro code is loop through a list of fields and use the Field.SearchFor method to search each field in turn and then consolidate the results.
-Rob
Thanks! I used your recommendation.