Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo/Dropdown List
Message
From
21/08/1998 14:55:53
 
 
To
20/08/1998 22:57:15
Bill Breay
Custom Business Software
Arvada, Colorado, United States
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00128666
Message ID:
00128879
Views:
25
I have an pageframe with a container. In the container are some standard text boxes and two Combo Boxes /Dropdown Lists style supported by seperate arrays. When a new entry is added or a current one is edited the values selected are updated to the table correctly. However, when the program is exited and called again all information that was added or previously edited is correct except that the two comboboxes contain the information in the first entry of the supporting array, not the content of the controlsource (table). The value in the table is also changed to the value of the first element of the supporting array. Help

Bill,

I have run into this one a couple of time. It does not do this all the time, but often enough to be a bother.

You are probably creating your rowsource array when the combodropbox is init()ed and you are probably using a data environment with your form.

When you create the rowsource array, it is automatically positioning itself at the 1st element of the array and assigning that value to the first record in the controlsource table.

One way to overcome this tendency is to hold off assigning a controlsource to the array until after the rowsource is created. Once the rowsource is created, position the controlsource table at the correct record, then assign the control source and refresh the combodropbox. That will eliminate the problem.

Another possibility is to hold off creating the rowsource array until after the controlsource is positioned and refreshed, then create the controlsource array.

Try one of these approaches. I think they will take care of the problem

regards
Jim Edgar
Jurix Data Corporation
jmedgar@yahoo.com

No trees were destroyed in sending this message. However, a large number of electrons were diverted from their ordinary activities and terribly inconvenienced.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform