Hi Everyone,
in VFP 9.0 SPK2, i have a combo box named cbosht the Style is dropdown list in a form and in the Init event i have this code:
WITH this as ComboBox
.RowSourceType= 3
.RowSource = "Select alltrim(sht)+'-'+ALLTRIM(layout) As shtlayout, sht, layout From "+;
"eng_shtd Into Cursor Ceng_shtd where job_no = Alltrim(Thisform.txtJobn.Value) Order By sht NOFILTER"
.BoundColumn = 2
.BoundTo = .T.
.Style = 2
ENDWITH
In my command save click i have this:
lcsht = thisform.Cbosht.DisplayValue
lclayout = thisform.cbosht.Value
Insert Into datatest (employee, Time, job_no, Day, TIME_TYPE, Code, descode, extradesc, work_type, sht, layout) Values (m.lcEmpNo, m.lnHours, m.lcJobNo, m.ldDate, m.lcTimetype, m.lcCode, m.lcdescode, m.lcExtra, m.lcWorkType, m.lcsht, m.lclayout)
the fields in table "eng_shtd.dbf" are as follow
Name type width
job_no C 6
sht C 3
layout C 7
descrip C 40
the other table is "datatest.dbf" where i need to get the values selected from the cbosht, when i save the entry on the form, the fields sht, layout from the combo are getting like truncated and layout is not getting into the datatest.layout, it is like is getting the first character fron the field sht, as well i would like to pass the descrip value from table eng_shtd for the selected record from the combo to the datatest.descrip, datatest.dbf have in common the same fields with the same specifications as the Eng_shtd.dbf of course just the sht, layout and descrip fields.
example if in the form i enter in the textbox a Job_no =103267 then the cobsht, should display only the records in eng_shtd that match that job_no nad list there just column sht and layout, actually it does, but when review in a browse, i can see that in datatest i got the sht replaced as part of the alltrim(sht)+'-', and the layout is a combination of the alltrim(sht)+'-'+ALLTRIM(sht) but i don't even get the whole value into this field, and of course i don't know how to pass the value of the descrip to Datatest.descrip, what could be wrong here ?
Thanks
Ernesto
in VFP 9.0 SPK2, i have a combo box named cbosht the Style is dropdown list in a form and in the Init event i have this code:
WITH this as ComboBox
.RowSourceType= 3
.RowSource = "Select alltrim(sht)+'-'+ALLTRIM(layout) As shtlayout, sht, layout From "+;
"eng_shtd Into Cursor Ceng_shtd where job_no = Alltrim(Thisform.txtJobn.Value) Order By sht NOFILTER"
.BoundColumn = 2
.BoundTo = .T.
.Style = 2
ENDWITH
In my command save click i have this:
lcsht = thisform.Cbosht.DisplayValue
lclayout = thisform.cbosht.Value
Insert Into datatest (employee, Time, job_no, Day, TIME_TYPE, Code, descode, extradesc, work_type, sht, layout) Values (m.lcEmpNo, m.lnHours, m.lcJobNo, m.ldDate, m.lcTimetype, m.lcCode, m.lcdescode, m.lcExtra, m.lcWorkType, m.lcsht, m.lclayout)
the fields in table "eng_shtd.dbf" are as follow
Name type width
job_no C 6
sht C 3
layout C 7
descrip C 40
the other table is "datatest.dbf" where i need to get the values selected from the cbosht, when i save the entry on the form, the fields sht, layout from the combo are getting like truncated and layout is not getting into the datatest.layout, it is like is getting the first character fron the field sht, as well i would like to pass the descrip value from table eng_shtd for the selected record from the combo to the datatest.descrip, datatest.dbf have in common the same fields with the same specifications as the Eng_shtd.dbf of course just the sht, layout and descrip fields.
example if in the form i enter in the textbox a Job_no =103267 then the cobsht, should display only the records in eng_shtd that match that job_no nad list there just column sht and layout, actually it does, but when review in a browse, i can see that in datatest i got the sht replaced as part of the alltrim(sht)+'-', and the layout is a combination of the alltrim(sht)+'-'+ALLTRIM(sht) but i don't even get the whole value into this field, and of course i don't know how to pass the value of the descrip to Datatest.descrip, what could be wrong here ?
Thanks
Ernesto