Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Looping through grid fields
Message
De
09/11/2001 04:29:50
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
08/11/2001 15:50:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00579365
Message ID:
00579540
Vues:
27
>Hi. VFP6. I want to loop through fields 5-10 of the first record of my grid looking for matching criteria. I could write a great big Case statement, but I am thinking that a loop with macro substitition would be more efficient. The problem is that I do not know how to refer to the individual "cells" in a looping scenario.
>
>Thanks, Randy
Randy,
Normally it's eval(columns(5).controlsource)..eval(columns(10).controlsource).
However columns might be rearranged making that useless. IMHO directly use controlsources as alias.field. If columns(5-10) initially match to field(5-10) of its recordsource :
*lcAlias = .myGrid.Recordsource
for ix=5 to 10
 if atc(lcSearch, trans(eval(field(ix,lcAlias)) ) > 0 && Found
 endif
endfor
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform