by acwoo » Tue Dec 11, 2007 3:07 pm
Thanks for your help.
@ 0.2, 0.4 LISTBOX oLbx FIELDS ;
tax3->desp;
HEADERS "Description";
FIELDSIZES 400 ;
SIZE 307, 160 OF oDlg;
FONT oFont
oLbx:cToolTip = "Press `Enter' To Select Item."
oLbx:bKeyDown := { | nKey, nFlags | If( nKey == VK_RETURN,;
saycusta(,lreturn := .f., oc1desp:SetFocus() ),) }
oLbx:bchange:={ || getform6c1desp(oc1desp), oc1desp:Refresh() }
@ 12.5, 0.4 Get oc1desp VAR cc1desp size 307, 11 OF oDlG COLOR;
CLR_GREEN
@ 9.95, 18.7 BUTTON "&Accept" OF oDlg SIZE 40, 12 ;
ACTION (getform6cxdesp(oLbx), ;
oDlg:SetFocus() ,SysREfresh(), oLbx:SetFocus())
@ 9.95, 25.7 BUTTON "&Exit" OF oDlg SIZE 40, 12 ;
ACTION ( lreturn := .t., oDlg:End())
ACTIVATE DIALOG oDlg CENTERED
..........................................................
function getform6c1desp(oc1desp)
select form6
crecnum = tax3->recnum
if crecnum = "Coynum"
c1desp = mCoynum
elseif crecnum = "Name1"
c1desp = mName1
elseif crecnum = "CoySec1"
c1desp = mCoySec1
elseif crecnum = "ICNum"
c1desp = mICNum
elseif crecnum = "SecAdd"
c1desp = mSecAdd
elseif crecnum = "RegSec"
c1desp = mRegSec
elseif crecnum = "RegState"
c1desp = mRegState
elseif crecnum = "RegPost"
c1desp = mRegPost
elseif crecnum = "PrinOB1"
c1desp = mPrinOB1
elseif crecnum = "PrinOB2"
c1desp = mPrinOB2
elseif crecnum = "PrinOB3"
c1desp = mPrinOB3
elseif crecnum = "AutCap"
c1desp = mAutCap
elseif crecnum = "NumShare"
c1desp = mNumShare
elseif crecnum = "ParValue"
c1desp = mParValue
elseif crecnum = "Declarea"
c1desp = mDeclarea
elseif crecnum = "Day1"
c1desp = mDay1
elseif crecnum = "MonthYr"
c1desp = mMonthYr
elseif crecnum = "CoySec2"
c1desp = mCoySec2
elseif crecnum = "LicenceN"
c1desp = mLicenceN
endif
cc1desp = c1desp
return oc1desp
********************************************
function getform6cxdesp(oLbx)
local nOldRec := RecNo()
c1desp = cc1desp
select form6
onerror("RLOCK")
if crecnum = "Coynum"
replace Coynum with c1desp
elseif crecnum = "Name1"
replace Name1 with c1desp
elseif crecnum = "CoySec1"
replace CoySec1 with c1desp
elseif crecnum = "ICNum"
replace ICNum with c1desp
elseif crecnum = "SecAdd"
replace SecAdd with c1desp
elseif crecnum = "RegSec"
replace RegSec with c1desp
elseif crecnum = "RegState"
replace RegState with c1desp
elseif crecnum = "RegPost"
replace RegPost with c1desp
elseif crecnum = "PrinOB1"
replace PrinOB1 with c1desp
elseif crecnum = "PrinOB2"
replace PrinOB2 with c1desp
elseif crecnum = "PrinOB3"
replace PrinOB3 with c1desp
elseif crecnum = "AutCap"
replace AutCap with c1desp
elseif crecnum = "NumShare"
replace NumShare with c1desp
elseif crecnum = "ParValue"
replace ParValue with c1desp
elseif crecnum = "Declarea"
replace Declarea with c1desp
elseif crecnum = "Day1"
replace Day1 with c1desp
elseif crecnum = "MonthYr"
replace MonthYr with c1desp
elseif crecnum = "CoySec2"
replace CoySec2 with c1desp
elseif crecnum = "LicenceN"
replace LicenceN with c1desp
endif
cc1desp = c1desp
oLbx:SetFocus()
oLbx:Refresh()
return nil
********************************************
Please help
Thanks
acwoo