Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Multiple Field Searching Tables
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Multiple Field Searching Tables
Divers
Thread ID:
00814015
Message ID:
00814015
Vues:
40
Good Morning,

I have a form with 3 fields i.e. Text1, Text2 and Text3

Text1 relates to modacad.key1 field
Text2 relates to modacad.key2 field
Text3 relates to modacad.key3 field

With the following SQL statement I would like to search a table named modacad.

The problem is this is for 1 field named Text1. The user may not search on the Text1 field. They may decide to search on Text2 field. I was wondering if anybody coule help on how to search a table by any COMBINATION of fields. The user could search using Text1 and Text3 fields or just Text2 fields.
WITH main.lstSource
 .RowSourcetype = 3
 .Rowsource = 'SELECT mainkey FROM ("U:\Data\modacad.dbf")'+;
              'WHERE thisform.text1.value=modacad.key1 order BY mainkey'+;
              'into cursor result'
 .ColumnCount = 1
ENDWITH

Many Thanks in Advance
Neil Lewis
IT R&D Manager
Velmore Ltd
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform