Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ComboBox behavior with integer key
Message
From
22/07/1999 13:10:11
 
 
To
21/07/1999 09:07:09
Rex Mahel
Realm Software, Llc
Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00244085
Message ID:
00244850
Views:
15
Rex,
I have had troubles with comboboxes and integer keys in the past until I created a class to handle it. You set boundto=.t. and boundcolumn property accordingly on the class property sheet. I usually let the first column be the one I want to show in the display, and col 2 be the integer key or boundto column. What the class does is create a temporary cursor using a "select into cursor nofilter" statement. I set rowsourcetype=2 and rowsource=cursorname after I create the cursor. It seems to me that when I switched to using rowsourcetype=2 many problems went away. This will only work if the combobox does not allow values to be added to the list. Does this help?

tc

>All,
>
>I have a simple form containing a Combobox. The RowSourceType is 6. The RowSource is 2 fields, a description field and an integer key field. The ControlSource is a form property whose value is one of the key fields. When I run the form, the Combo is initially blank. When I make a selection all behaves as normal. If I change the Form property to the record number and run the form, the cooresponding record is selected and displayed.
>
>I know I am missing something simple and I seem to remember something about integer keys, but I don't know what it is.
>
>Help!
>
>TIA
>
>Rex
Previous
Reply
Map
View

Click here to load this message in the networking platform