Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo Box Help
Message
De
06/11/1996 13:59:59
 
 
À
06/11/1996 12:42:03
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00011600
Message ID:
00011606
Vues:
36
>Time for dumb question of the week.
>
>I'm just starting out in VFP 3.0. I've picked up several great books but they all seem to assume that you've been working in VFP for awhile.
>
>My problem:
>
>I have a form which has 4 combo boxes on it. They are in sets of two. When the user chooses from the first combo box the second box fills with items only relating to the choice. e.g. First is Department, second would be only sections of that department. The combo list holds a code and title, but I am showing only the title. I can get the first combo working but not the second. I tried an example from MS KB files using Select but thats not working. Also when I try setting the DisplayValue to the title it blanks out.
>
>Any suggestions????????
>
>Larry Koss
>US EPA

There are many ways to do this job. I think the normal way is following:
1. Your comboboxes should have ColumnCount=2 and you have to bound them to proper field.
2. Start comboboxes (containing e.g. Dept) use Dept.dbf as RowSource.
3. Next comboboxes (containing e.g. Sections) use cursor MyCursor1 as RowSource.
4. Any time you pick item from start combobox you Select into appropriate Cursor and then Requiry next combobox.
This is the idea. If you don't like cursors you may use arrays or even the same table with resetting filter conditions.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform