Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combo box value
Message
From
04/07/2001 05:21:37
 
 
To
03/07/2001 17:26:49
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00526254
Message ID:
00526615
Views:
16
Hi!

The value in the combobox shuld match exactly to the value in the Value property. For example, if you fill the list by values from the field, you will have:

"TOTO "
"MOOMM "
...
Than, wehn you assign "TOTO" to the value, it does not match. You require to assign "TOTO " - PADR() the value by spaces to the length of the field.

Of course, you can use the ListIndex:
lcValue = "TOTO"
for i=1 to thisform.Combobox1.ListCount
  if thisform.Combobox1.List[i,1]=lcValue
    thisform.Combobox1.ListIndex = i
    exit
  endif
endfor
HTH.

>Is it me who didn't quite understand or the way i explained it ?!? In fact, what I want is to "force" a value in a combo box, as a display value. Example: My combo box's row source type is at "Fields" (like I said before) and I know that my combo contains a new value that we'll call "TOTO". 'Cause my combo is not set at "Value" (in this last case, we can easily say: Combobox.Value = "TOTO"), how can I say to it: "Display me TOTO" ? I thought I would see a property like "Combobox.Set" or "Combobox.Select", but it doesn't exist. To resume, how "force" a combobox to display a value that we know he has? Thanks for your patience! :o)
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform