Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Como buscar un elemento en ComboBox
Message
De
31/01/2005 11:52:42
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
00981492
Message ID:
00982278
Vues:
45
>Asumiendo que tienes un indice por el nombre del país
>
>
>   Select miTabla
>   Seek cValorABuscar
>     If Found()
>         Thisform.ComboBox.DisplayValue = MiTabla.miCampo
>     endif
>
>
>Si no tienes un índice con el nombre del país y la tabla no contiene muchos registros puede hacerse lo mismo utilizando LOCATE en vez de SEEK, aunque esto ultimo no sería aconsejable.
>
>HTH,
>
>Enmanuel


O mas corto:
   Select miTabla
   If Seek(cValorABuscar)
         Thisform.ComboBox.DisplayValue = MiTabla.miCampo
   Endif
Con respecto a LOCATE, si el índice tiene optimización Rushmore a full, es tan rápido como Seek en una tabla simple (y corta) como paises.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform