Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ComboBox ControlSource problem
Message
 
À
04/10/2011 08:57:24
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01525536
Message ID:
01525540
Vues:
41
>>Hi Gang!
>>
>>Weird problem here I came across and having a bit of a time trying to figure it out....
>>
>>I have a form with a combobox which pulls from a table called ECL. The comboBox has a table called PM as its CONTROLSOURCE.
>>
>>PM has one field - SC which is Numeric of 1, 0
>>
>>Now..... the ComboBox is Bound to Column 2 of the SQL below....
>>
>>The RowSource of the ComboBox is the 2nd column of the ECL table.... here is the code for the RowSource...
>>SELECT FLD_DESC, VAL(FLD_VALUE) AS SC FROM ECL WHERE FLD_NO = '305' AND FLD_NAME = 'C5' AND RANK > '1' INTO CURSOR CSRTOMMY ORDER BY FLD_VALUE
>>
>>The RowSource Type is 3 - SQL.
>>
>>and the 3 records that are exposed by the SQL are...
>>
>>FLD_DESC FLD_VALUE
>>
>>Not Specified 0
>>
>>Male 1
>>
>>Female 2
>>
>>So... When I pick Not Specified, I was expecting 0 to be in PM.SC... but I get 1
>>
>>When I pick Male, I expect 1, but I get 2
>>
>>and when I pick Female, I expected 2, but I get 3.
>>
>>Looks like I am getting the Record Number of the csrTommy. What am I obviously overlooking?
>>
>>Thanks!!
>
>Did you set the combo's BoundTo property to .T.? You need that to bind to a numeric value.
>
>Tamar

No, it wasn't.... that worked great! Thanks!
Tommy Tillman A+ NetWork+ MCP
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform