Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combo
Message
De
08/04/2004 08:47:32
 
 
À
08/04/2004 08:30:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Re: Combo
Divers
Thread ID:
00893230
Message ID:
00893234
Vues:
20
I would like to allow my users to first select which company they would like to process reports for. The selection is a combo box, dropdown. Based off the company, I would like for my users to select from a list only those personnel within that company who they want to runreports for. Can anyone assist?
Thanks in Advance.


1. If the personel for all firms are in one table:
Put the RowSourceType of the ListBox = 3 && SQL Statements
In InterActiveChange Event of the combo Put this:
thisform.ListBox1.RowSource = "SELECT * FROM YourPersonelTable WHERE YourPersonelTable.FirmId = '"+this.Value+"' INTO CURSOR cPersonel"
thisform.ListBox1.Requery()
Keep in mind that if the FirmID is Numeric Value You must remove single quote before & after this.Value & use STR(this.Value) instead



2. If the Personel are in Different tables, Put the
Put the RowSourceType of the ListBox = 6 && Fields
In InterActiveChange Event of the combo Put this:
DO CASE
   CASE this.Value == FirrsFirmID
        thisform.ListBox1.RowSource = "TableOfPersonelForFirstFime.FieldYouHaveToDisplay"
.......
ENDCASE
thisform.ListBox1.Requery()
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform