>>Hi Cetin,
>>
>>Things come closer (but not much clearer)
>>
>>Ok. I can see your idea work.
>>
>>At least on a plain form
>>
>>I can not get this to work on my forms.
>>It must be something dataenvironment specific. Your example fails if I set datasession = 1 and run in the environment of my Form.
>>
>>If I use the characters instead of integer it will influence its record source, if I use the integer it fails:
>>
>>-combobox will not display the value
>>-comboobx
value will be inital at fields value,
DisplayValue will be empty
>>-If I open the combo to pick (or just close) it will set the field (controlsource) to 0
>>
>>Do you have any idea what could have influence?
>>
>>Agnes
>
>Dataenvironment would only affect it in the sense Combo have its source by a handle. You shouldn't use or close its cursor elsewhere. Other than that all I can think of is you may have forgot setting BoundTo = .t.
>
>Cetin
Cetin,
I fear we will end in endless missunderstandings.
Dataenvironment in the sense of a datasession. (SET( DATASESSION) , a private datasession.)
Since we talk about instantiated classes there is no real use of the dataenvironment object?
So I mean
environment of a private datasession in the sense the sum of all SET commands may be different.
My code is as simple as (lof is a public declared outside)
IF !USED('OBJEKT_GEWERBE') THEN
USE OBJEKT_GEWERBE IN 0
ENDIF
lof = CREATEOBJECT("form")
WITH lof
.ADDOBJECT('cbOLIST','combobox')
WITH .cbOLIST
.BOUNDCOLUMN = 2
.BOUNDTO = .T.
.COLUMNCOUNT = 2
.COLUMNWIDTHS = "180,0"
.ROWSOURCETYPE = 3
.ROWSOURCE = "select cName,iObj_Ix"+;
" from GEWERBE"+;
" order by 1" +;
" into cursor crsComboSource"
.SPECIALEFFECT = 1
.STYLE = 2
.CONTROLSOURCE = "OBJEKT_GEWERBE.PARENT_IX"
.VISIBLE = .T.
ENDWITH
.VISIBLE = .T.
ENDWITH
No other cursor then the cursors mentioned above are used
Agnes
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]