General information
Category:
Coding, syntax & commands
Environment versions
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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only