Ernesto_Paez
MIS
Hi everyone,
Would like to know,if i can show in this combobox, when i gets focus by default the following value ('Mach Serial#')
and be able to press enter and once, i have pressed enter to Enable a txtbox(txtjobno), to enter the serial number, the name of the comboxbox = cbojobno
combobox code in the init event see below
the code i have in the cbojobno interactive event is as follow
i am able to display in the combobox by default the value ='Mach Serial#' as i put code in the gotfocus, but i am not able when selecting that value in the combobox, to enable the txtjobno, to imput a value there, any help very very appreaciated besides of learning a trick thanks in advance
Would like to know,if i can show in this combobox, when i gets focus by default the following value ('Mach Serial#')
and be able to press enter and once, i have pressed enter to Enable a txtbox(txtjobno), to enter the serial number, the name of the comboxbox = cbojobno
combobox code in the init event see below
Code:
With This
.RowSourceType= 1
.AddListItem('Mach Serial#')
.AddListItem('\-')
.AddListItem('\Non Serial#')
.AddListItem("89741")
.AddListItem("89744")
.AddListItem("89760")
.AddListItem("89736")
.AddListItem("13100")
.Style= 2
.ListIndex=0
ENDWITH
Code:
Local lcJobNo
lcJobNo = Alltrim(This.DisplayValue)
With This.Parent
.txtJobNo.Visible = .F.
.txtJobNo.Value = 0
.cbowtype.Enabled = .F.
.cboDescription.Enabled = .F.
.chksheet.enabled = .f.
Do Case
Case m.lcJobNo = "89741"
.cbowtype.Value = 'Miscellanous Assemby'
.cboDescription.Value = 'Misc Assembly'
.txtextradesc.Enabled = thisform.cmdAbort.Enabled
Case m.lcJobNo = "89744"
.cbowtype.Value = "Assembly (Regular)"
.cboDescription.Value = "Miscellaneous Sample print"
.txtextradesc.Enabled = thisform.cmdAbort.Enabled
Case m.lcJobNo = "89760"
.cbowtype.Value = "Assembly (Regular)"
.cboDescription.Value = "Ptod, Holidays, etc"
.txtextradesc.Enabled = thisform.cmdAbort.Enabled
Case m.lcJobNo = "89736"
.cbowtype.Value = "Assembly (Regular)"
.cboDescription.Value = "R & D Miscellaneous"
.txtextradesc.Enabled = thisform.cmdAbort.Enabled
Case m.lcJobNo = "13100"
.cbowtype.Value = "Assembly (Regular)"
.cboDescription.Value = "STANDARD"
.txtextradesc.Enabled = thisform.cmdAbort.Enabled
OTHERWISE
.txtJobNo.Visible = .T.
.txtJobNo.Enabled = .T.
.cbowtype.Enabled = .T.
.cboDescription.Enabled = .T.
.txtextradesc.Enabled = thisform.cmdAbort.Enabled
.cbowtype.Value = "Assembly (Regular)"
.cboDescription.Value = '' && None yet, let them select
.chksheet.enabled = .t.
.txtJobNo.SetFocus
ENDCASE
If Alltrim(This.DisplayValue) <> 'Mach Serial#' &&'Others'
Thisform._sheetrefresh()
Endif
Endwith