Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2008 Server
>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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement