Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
.Value dissappearing
Message
De
27/05/1997 13:57:08
Matt Mc Donnell
Mc Donnell Software Consulting
Boston, Massachusetts, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00033729
Message ID:
00033736
Vues:
42
>I have created a combobox based on a single field table. If the user types in a value not in the table they are prompted to add it to the list. If the user selects Yes, then the .DisplayValue is INSERTed into the combobox's source table and REPLACEd in the current record and then a THISFORM.Refresh is issued. This works fine as the new choice is available in the combobox but the value the user typed in dissappears from the screen. Any ideas?

Colin,

I hope you get better answers than I did when I had a similar problem recently. To be honest, I'm not sure how I solved it, but I did. Although the subject of your post is .Value disappears, I'm assuming that .Value is kept where .DisplayValue disappears, am I assuming correctly?

If I am, this is what I concluded: It appears, and my perception could be wrong, that there is some issue with updating the DisplayValue after a requery to ensure that both the Value and DisplayValue are kept.

Try this right before your form refresh:
luValue = THIS.DisplayValue
THIS.requery()
THIS.DisplayValue = luValue

It might work.

HTH
Matt McDonnell
...building a better mousetrap with moldy cheese...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform