Sorry Guys,
Been going around in circles with this for the last four hours and getting nowhere.
stripped out the code to make it as simple as I can.
I ask for a value for vReg, the status of the checkbox (true/false) determines which value to set vFilter.
Been going around in circles with this for the last four hours and getting nowhere.
stripped out the code to make it as simple as I can.
I ask for a value for vReg, the status of the checkbox (true/false) determines which value to set vFilter.
Code:
dim regflag as l = .f. dim vReg as c dim vFilter as c ui_modeless_dlg_box("Query Selection",<<%dlg% {Background=#234+234+255} {removecomments} {font=Arial,9} {region1} (vOption:Reg); {Line=1,0}; {condition=(vOption="Reg")} {start_pos}{region} Reg/Serial:| [.16vReg!RegEvent_*]{sp=2}(RegFlag) Fragment ? {endregion} {endregion1}; {condition=.t.} {region} <Go!Go><Close!Close> {sp=2}{text=%O={@@}%60,1.5:vSearchMsg}; {endregion}; {endregion2}; %dlg%,<<%code% if a_dlg_button = "CLOSE" then ui_modeless_dlg_close("Query Selection") end if if left(a_dlg_button,9) = "RegEvent_" then if a_dlg_button = "RegEvent_change" then if [COLOR=#ff0000]RegFlag = .t.[/COLOR] then [COLOR=#0000ff]vFilter = "('"-vReg-"' $ Reg)"[/COLOR] elseif RegFlag = .f. then [COLOR="#0000FF"] vFilter = "(reg="-quote(rtrim(vReg))-".or.as="-quote(rtrim(vReg))-").or.('"-vReg-"' $ Old_id)"[/COLOR] end if vOrder = "REG" end if a_dlg_button= "" end if if a_dlg_button = "Go" then if rtrim(vFilter) = "" then vSearchMsg = "Invalid Filter" else vSearchMsg = "Filter is "-quote(vFilter)-" and Order is "-quote(vOrder) end if end if %code%)
Comment