Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Characters type
Message
 
À
17/12/2006 08:19:00
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01178382
Message ID:
01178388
Vues:
21
This message has been marked as the solution to the initial question of the thread.
>hi,
>thank you for reply and new code,
>but still i see field (numaric type) at combo1
>
>

Mohammed try this
CREATE CURSOR MyLocalCursor (FieldName C(20),;
                             FieldType C(1))
SELECT 0
WITH ThisForm
  .text1.Value = GETFILE('dbf')
  .select_file = .Text1.Value
  IF FILE(.select_file) && This checks for the file to exist
      USE (.select_file)
      AFIELDS( .my_fields, JUSTSTEM(.select_file) )

      SELECT myLocalCursor 
      APPEND FROM ARRAY .my_fields
      SET FILTER TO FieldType = "C"
      GO TOP
      
      WITH .Combo1
        .RowSourceType = 6
        .RowSource = [MyLocalCursor.Fieldname]
        .Value     = MyLocalCursor.Fieldname
        .Requery() && Needed to reload the combo's list with the values in the array
      ENDWITH
       .text1.Visible  = .t.
  ENDIF
ENDWITH
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform