Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Searching a table and jumping to the record
Message
De
01/06/2005 03:59:09
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01018885
Message ID:
01018893
Vues:
12
You can either use a select statement, which I prefer, or SET FILTER TO field1=trim(cfield1) and field2=trim(cfield2)... If you choose the SQL select option, you have to SET ANSI OFF first. To avoid having to rebuild the grid, I always bind the grid to a cursor, which I initialize in the activate of my form, by the command
Select * From myTable Into Cursor myCursor Readwrite Where .F.
lcAnsi=Set('Ansi')
Set Ansi off
Select * From myTable Where field1=trim(cfield1) and field2=trim(cfield2) ... Into Cursor curDummy
Set Ansi &lcAnsi
Select myCursor
Zap
Append From Dbf('curDummy')
YourGrid.Refresh()
>Thanks Tore
>
>What if I have 2 records as a result of the search. I want to display them to the user and allow the user to select one of them which will then jump to that record and then display this information in my main form. Do I need to use a select statement?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform