K
Krzysztof Bartosiewicz
Hi!
I have a little problem. I have a combo box with a source like that:
SELECT ConsultChoices.ID_CHOICE, ConsultChoices.ID_SIGN,
ConsultChoices.ChoiceName
FROM ConsultChoices;
The table ConsultChoices:
ID_CHOICE ChoiceName ID_SIGN
0 Option1 0
1 Option2 1
2 Option3 2
3 Option4 3
999 Option5 x
I set "999" as the default value. When I open the form everything is ok - I
can see "x" instead of "999". The problem is that when I select value "x" so
the value in the field is stored as "999" and I open the form again to show
the record the source changes to:
SELECT [ConsultChoices].[ID_CHOICE], [ConsultChoices].[ChoiceName] FROM
ConsultChoices;
and I see 999 as the value of the combo - I would like to see "x"
Do you have any idea why the source changes? I will be greateful for any
suggestions...
One more thing.. I probably cannot use text values. The whole idea is that
the client want to have to choose from 0, 1, 2, 3 and "x" but I have to sum
those values. Maybe it is possible to sum text values but I would rather use
numbers. When I used text values it was strange - if I summed up the fields
by simply typing "=field1+field2" as the source of a text field it the
result was OK if I summed numbers and returned "error" if there was "x"
value. However when I tried the same using a query in SQL it returned
concatenation of the strings so the sum of 1 and x was "1x"
Thanks in advance for any help
Chris
I have a little problem. I have a combo box with a source like that:
SELECT ConsultChoices.ID_CHOICE, ConsultChoices.ID_SIGN,
ConsultChoices.ChoiceName
FROM ConsultChoices;
The table ConsultChoices:
ID_CHOICE ChoiceName ID_SIGN
0 Option1 0
1 Option2 1
2 Option3 2
3 Option4 3
999 Option5 x
I set "999" as the default value. When I open the form everything is ok - I
can see "x" instead of "999". The problem is that when I select value "x" so
the value in the field is stored as "999" and I open the form again to show
the record the source changes to:
SELECT [ConsultChoices].[ID_CHOICE], [ConsultChoices].[ChoiceName] FROM
ConsultChoices;
and I see 999 as the value of the combo - I would like to see "x"
Do you have any idea why the source changes? I will be greateful for any
suggestions...
One more thing.. I probably cannot use text values. The whole idea is that
the client want to have to choose from 0, 1, 2, 3 and "x" but I have to sum
those values. Maybe it is possible to sum text values but I would rather use
numbers. When I used text values it was strange - if I summed up the fields
by simply typing "=field1+field2" as the source of a text field it the
result was OK if I summed numbers and returned "error" if there was "x"
value. However when I tried the same using a query in SQL it returned
concatenation of the strings so the sum of 1 and x was "1x"
Thanks in advance for any help
Chris