Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dropdown list
Message
From
03/01/1997 22:59:09
John Adams
John T. Adams Software Consulting Svcs
Keedysville, Maryland, United States
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00016377
Message ID:
00016436
Views:
36
>>>Ok, guys. After you stop laughing :) How do I get the first element in a dropdown list to appear at creation time. In the past I have used listindex however this particular dropdown is populated by fields and not my usual array. :( Any ideas?
>>
>>Because the control is bound to the table field, what I usually do, is to do the REPLACE of the control value from the AddNew() method.
>
>Thanks Michel.

Joe,

Be careful with this... If you are opening your form on a blank record, but your user has the ability to search for a new record, or the like, you may not want to be replacing the value with the drop downlist value. What I will often do if I want the value to appear, but not necessarily be stuck into the table at form start up, is to bind the list to a custom property of the form, and then when saving the record, replace the field value with the value stored in the custom property.

HTH,

John Adams
John Adams

John T. Adams
Software Consulting Services
Previous
Reply
Map
View

Click here to load this message in the networking platform