Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBoxes start reprogamming themselves?
Message
From
08/06/1999 15:10:44
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
ComboBoxes start reprogamming themselves?
Miscellaneous
Thread ID:
00227609
Message ID:
00227609
Views:
53
I've got 3 Comboboxes on a contianer class on the second page of a form. The combos item lists come from an array called aItems. I build this array in the Init Event of the each combo using a Select SQl command. The second two boxes select statements contain a "when" pertaining to the DisplayValue of the first box. Now this was working correctly just 2 hours ago, and my combos would load up on the form with the displayvalue populated. Now they don't, and thats because the display value of the first box doesn't appear to be populated until we change to the second page of the form. I'm not sure whats happening but if you're really smart you could probably figure this out with more info. Here's a sample of what my code might be:

PROCEDURE box1.Init && First Box
DoDefault()
WAIT WINDOW 'state'

SET FILTER TO
SELECT field1,;
field2, ;
LOWER(field1) ;
from table1 ;
WHERE EMPTY(field3) AND EMPTY(field4);
order by 3 ;
into array This.aItems

ENDPROC

PROCEDURE box2.Init &&Second box
Dimension This.aItems[1,3]
This.aItems=''

SELECT field1,;
field2, ;
LOWER(field1) ;
from table1 ;
WHERE EMPTY(field3) AND EMPTY(field4) AND;
ALLTRIM(field5) == ALLTRIM(This.Parent.box1.displayvalue);
order by 3 ;
into array This.aItems

This.NumberofElements=ALEN(This.aItems,1)
This.Refresh()
ENDPROC
Next
Reply
Map
View

Click here to load this message in the networking platform