Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox
Message
De
25/08/2008 12:49:57
James Wolff
Creative Computing, Inc
Angola, Indiana, États-Unis
 
 
À
24/08/2008 18:33:34
James Wolff
Creative Computing, Inc
Angola, Indiana, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01341401
Message ID:
01341566
Vues:
22
This message has been marked as the solution to the initial question of the thread.
I Have resolved the issue. Thanks to all .

HERE IS THE SITUATION:
I Have a Form with 2 Combo Boxes and a bunch of data relating to those combo selections.
ComboBox 1 (CboWks) gives a list of weeks ('01'.'02'.....'52'
The cboWks is set up as:
ControlSource.....................NONE
RowSource........................ v_Weeks.Wk
RowSourceType................. 6 - Fields
ComboBox 2 (CboEvents) gives a list of events that will occur on the cboWks selection..
CboEvents is set up as:
ControlSource.....................NONE
RowSource........................ v_Events.Event
RowSourceType................. 6 - Fields
As different weeks are selected from cboWks, I need to requery the events table for the events for that week
Then, when cboEvents is traversed, the other fields on the form will be filled with the appropriate event data.
Consequently, I need to have the cboEvents reflect the first event for that week, and all related fields showing their data.
.
HERE IS THE PROBLEM
As I traverse cboWks, The cboEvents box was remaining blank unless I clicked on it. All the other fields on the form were being filled in and showing correctly for the first event,

HERE IS THE SOLUTION:
In the cboWks "InteractiveChange" method
WITH thisform
     * Set the view parameter for Events Object to the week highlighted
       .EventsObj.cWk = this.value 
     * Requery the EventsObj
        .EventsObj.requery()
     * Set the resulting view to the top of the list
         SELECT v_Events
         LOCATE
     * Now requery the events Combo
       .cboEvents.Requery()
     * Refresh the ComboBox
       .cboEvents.Refresh()
ENDWITH
It is a fine looking and powerful form now and
I Hope this methodology is useful to all
Jim Wolff
Creative Computing, Inc.

P.S.
I am using the Mere Mortals Framework and use views exclusively rather than tables directly.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform