Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP6 SQL with combo box
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00336809
Message ID:
00337036
Views:
25
Thanks Mark, that was so simple, I appreciate your help.

Jim



>Set the property BoundTo of the combobox to .T. for numeric sources.
>
>>Hi All,
>>
>>I'm having a problem trying to get the correct return value from a combobox that uses a sql select as it's recordsource.
>>
>>Here's the code in the rowsource:
>>
>>select DISTINCT yr_bred from master where yr_bred > 1995 ORDER BY YR_BRED DESC into cursor yrbred
>>
>>The combobox populates with the data I want to see, but when I use the combobox.value in the where clause of a subsequent SQL select, the value appears to be the order in which it appears in the combobox, not the actual year.
>>
>>Here's what I mean:
>>
>>The "select distinct..." creates a cursor with 5 records as a result;
>>
>>2000
>>1999
>>1998
>>1997
>>1996
>>
>>These years show up in the combobox dropdown.
>>
>>If I select the first year, 2000, the value being used in the next select is 1, the order 2000 appears in the dropdown. If I select 1997 the value returned is 4.
>>
>>I'm storing the comboxbox value to a variable to be used in the subsequent select statement (ie. myear = combobox.value) and I've set the value property in the properites box to 0, for numeric.
>>
>>Any ideas as to what I need to do to correct this behavior.
>>
>>Thanks,
>>
>>Jim Harvey
>>jharvey@netrax.net
Previous
Reply
Map
View

Click here to load this message in the networking platform