IForgotAgain
Programmer
This is something that has been bothering me and I figure that now is as good a time as any to get things clarified.
When I use ComboBox's on a form, there continues to be some confusion as to which property I need to examine in order to determine the input visible on the form.
Value
Text
DisplayValue
The VFP7 Help file does not make it clear as to which property I should be getting data from.
I have been using the following, but I have to admit that it has been through trial-and-error, not through a knowledgeable choice.
When I use ComboBox's on a form, there continues to be some confusion as to which property I need to examine in order to determine the input visible on the form.
Value
Text
DisplayValue
The VFP7 Help file does not make it clear as to which property I should be getting data from.
I have been using the following, but I have to admit that it has been through trial-and-error, not through a knowledgeable choice.
Code:
* --- Used when initializing ComboBox to display a known value ---
* ------- Correct?? Or Not? ------
ThisForm.cboMyCombo.Value = mcNewDisplay
* --- Used when getting values from ComboBox ---
* --- Which One??? Sometimes one seems to work and sometimes the other ---
mcUserInput = ThisForm.cboMyCombo.Text
mcUserInput = ThisForm.cboMyCombo.DisplayValue
[\Code]
I am hoping that someone out there can explain this CLEARLY so that I can begin using the appropriate property from a position of knowledge, not luck.
Thanks,
I_Forgot_Again