Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Listbox - SQL
Message
 
 
To
19/04/2001 12:24:59
Chuck Tripi
University of Wisconsin - Milwaukee
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00497353
Message ID:
00497400
Views:
14
cTableName = alltrim(ThisForm.ComboBoxName.DisplayValue)
cVariable = '%' + alltrim(upper(ThisForm.ControlName.Value)) + '%'
select fields from (cTableName) where upper(somevalue) like ?cVariable order by somefield

This will be optimized as long as you have an INDEX ON UPPER(SOMEVALUE) tag. I leave it to you to determine what fields to select.

>VFP 6.0
>
>I have a 'search' form with a listbox. First, the user picks something from a Combobox with a list of what to search on (via, Org, Name, Person ID, Auth Type), then the code visible the labels/texts accordingly. Once the text(s) are filled in and the 'Find' button is clicked, I want to list the search on the listbox. The trick is I need to do different things as well with different tables.
>
>Lets say I want to do a search for Org $ 'Systems', I want to use the ORG table and list only two fields (org # and org name) with any wording included 'systems'.
>
>Lets say I want to do a search for Name $ 'Smith', I want to use the PERSON table and list only one field (name) with any wording included 'smith'.
>
>Etc...
>
>Now, the next thing is how to correspond back to the correct table (index, recno(), ??) and then I do whatever coding thereafter.
>
>The first thing that comes in my mind was to use SET FILTER TO but we know it's terrible slow. Anyone have ideas/suggestions to help me get started?
>
>Chuck
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform