Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Preselecting default in dropdown list box (or combobox)
Message
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Preselecting default in dropdown list box (or combobox)
Divers
Thread ID:
00257607
Message ID:
00257607
Vues:
48
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform