Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Network:
Windows 2003 Server
>I'm having a problem with a Combobox dropdown listbox and finding this difficult to debug. The behavior while running under the debugger is fine. But outside the debugger it is not working as I expect.
>
>I populate the the listbox with 2 columns. The first column contains the text choices, and the 2nd column contains a ChoiceID for that choice. I have set BoundColumn to 2,BoundTo to .T., and ControlSource to a field in a table where the ChoiceID is stored.
What is the datatype of the controlsource field? -
combo.BoundTo=.T. is only useful for numeric/integer types,
when yours is char(), it might explain the behavior you described.
>
>I am using InteractiveChange for the dropdown listbox to handle the user's selection.
>
>For debugging, I set a breakpoint in the InteractiveChange change event for the combobox. Under the debugger, when I get to InteractiveChange, the selection for the listbox is the one that the user has just made, which I expect. However, when I run outside the debugger, when my InteractiveChange code gets control, the selection is not the one the user has just made, but the previous value, the selection before the user made his choice.
>
>Is there some other event that I should be handling instead of InteractiveChange?
When combo.Style=2, you can use combo.Valid().
What does your current code in InteractiveChange() do?
hth
-Stefan
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement