Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Preselecting default in dropdown list box (or combobox)
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Preselecting default in dropdown list box (or combobox)
Miscellaneous
Thread ID:
00257607
Message ID:
00257607
Views:
47
OK, here's another one I can't find any info on in the docs:

How can I preselect a default item from a drop-down list box?

I have a ddlist box with a RowSource Type Alias pointing to a table containing a list of 2-digit character years (99, 00, 01, etc.). Presently the box is blank when the form is first opened.

I would like to display and select the year that corresponds to the two digits of the current year. Somewhere I need to do a RIGHT(TRANSFORM(YEAR(DATE())),2) and identify the matching selection in the list, display it as the default, and assign the value to a private variable. If the user changes the item in the list, the new value should be assigned to the private variable.

Suggestions, Please?

Thank you,
Neil Preston
Next
Reply
Map
View

Click here to load this message in the networking platform