Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Combobox problem - not selecting
Message
 
To
02/03/2010 12:39:39
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01452031
Message ID:
01452055
Views:
67
This message has been marked as a message which has helped to the initial question of the thread.
>>>>>>>I have a combobox on a form working fine with rowsourcetype = 1 and rowSource as 1 to 6.
>>>>>>>
>>>>>>>Now I get a requirement to change the row source to 1 to 120.
>>>>>>>
>>>>>>>So, I created a cursor with 1 integer field and populate it. change rowSourceType to 6 and rowSource to the cursor name.
>>>>>>>
>>>>>>>The comboBox populating fine but I can not select anything from it.
>>>>>>>The combobox is bound to a integer column in the database.
>>>>>>>
>>>>>>>I am not sure if this is a bug in V9 or I am doing something wrong.
>>>>>>
>>>>>>Your RowSourceType should be set to alias, not fields in this case.
>>>>>
>>>>>I tried all the combination except array. the same problem.
>>>>>There is no code in the combobox.
>>>>
>>>>Check BoundTo property of this combobox.
>>>
>>>I don't think BoundTo will cause this but I tried it .F. and .T. the same problem.
>>>
>>>This is weird and I am sure i am doing something stupid here but can't see it
>>
>>Set its value to 0 in Properties Window.
>
>I just transformed the integer to character and it is working fine.
>I did select ALLT(STR(valuefield))
>
>So we can not use integer as a source for combobox?


Sure you can, but for this you should tell the Combo that you want to have its value as a numeric.
Just set Value Property to 0 (zero) and it will convert all for you.
Remember, ALL LIST() values are CHAR() no matter how you store them. You can't use any other type than char with ADDITEM() or ADDLISTITENM().
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform