I have the following dialog box that I am using to branch between two tables and forms. Everything works fine except when the cancel button is selected the scripts still run and the designated form still opens. I have tried adding:
varC_Result = "CANCEL"
END
END IF
but still does not work, can anyone help?
Hoyt.
'Create an XDialog dialog box to prompt for parameters.
'In order to evaluate expressions using the eval() function, in the context of
'the current form, the "form_name" variable is defined.
DIM form_name as C
if is_object(topparent.this) then
form_name = topparent.name()+".this"
else
form_name = ""
end if
DIM GLOBAL vcTest as C
DIM GLOBAL varC_result as C
heading_string = "All sections are"
footer_string = "Click GO to enter the selected section"
ok_button_label = "&GO"
cancel_button_label = "&Cancel"
DELETE expression_result
expression_result = eval("\"ARSON\"",form_name)
vcTest = convert_type(expression_result,"C")
varC_result = ui_dlg_box("TITLE 11 SECTIONS",""%dlg%
{region}
{text=30,1:heading_string}
{endregion};
{region}
{region}listed alphabetically:{endregion}|
{region}(vcTest:ARSON);
(vcTest:ASSAULT);
(vcTest:BURGLARY);
(vcTest:CONDITIONS OF RELEASE);
(vcTest:COMPUTERS);
(vcTest:CUSTODIAL INTERFERENCE);
(vcTest:DISORDERLY CONDUCT);
(vcTest:DV ORDER);
(vcTest:ESCAPE);
(vcTest:FALSE REPORTS);
(vcTest:FORGERY);
(vcTest:HARASSMENT);
(vcTest:HINDERING PROSECUTION);
(vcTest:INCEST);
(vcTest:INDECENT EXPOSURE);
(vcTest:KIDNAPPING);
(vcTest:MICS);
(vcTest:MIW);
(vcTest:MINORS);
(vcTest:MISCHIEF);
(vcTest:TRESPASS);{endregion};
;
{endregion};
{region}
{text=30,2:footer_string}
{endregion};
{line=1,0};
{region}
"*15=ok_button_label!OK" "15=cancel_button_label!CANCEL"
{endregion};
%dlg%)
varC_Result = "CANCEL"
END
END IF
but still does not work, can anyone help?
Hoyt.
'Create an XDialog dialog box to prompt for parameters.
'In order to evaluate expressions using the eval() function, in the context of
'the current form, the "form_name" variable is defined.
DIM form_name as C
if is_object(topparent.this) then
form_name = topparent.name()+".this"
else
form_name = ""
end if
DIM GLOBAL vcTest as C
DIM GLOBAL varC_result as C
heading_string = "All sections are"
footer_string = "Click GO to enter the selected section"
ok_button_label = "&GO"
cancel_button_label = "&Cancel"
DELETE expression_result
expression_result = eval("\"ARSON\"",form_name)
vcTest = convert_type(expression_result,"C")
varC_result = ui_dlg_box("TITLE 11 SECTIONS",""%dlg%
{region}
{text=30,1:heading_string}
{endregion};
{region}
{region}listed alphabetically:{endregion}|
{region}(vcTest:ARSON);
(vcTest:ASSAULT);
(vcTest:BURGLARY);
(vcTest:CONDITIONS OF RELEASE);
(vcTest:COMPUTERS);
(vcTest:CUSTODIAL INTERFERENCE);
(vcTest:DISORDERLY CONDUCT);
(vcTest:DV ORDER);
(vcTest:ESCAPE);
(vcTest:FALSE REPORTS);
(vcTest:FORGERY);
(vcTest:HARASSMENT);
(vcTest:HINDERING PROSECUTION);
(vcTest:INCEST);
(vcTest:INDECENT EXPOSURE);
(vcTest:KIDNAPPING);
(vcTest:MICS);
(vcTest:MIW);
(vcTest:MINORS);
(vcTest:MISCHIEF);
(vcTest:TRESPASS);{endregion};
;
{endregion};
{region}
{text=30,2:footer_string}
{endregion};
{line=1,0};
{region}
"*15=ok_button_label!OK" "15=cancel_button_label!CANCEL"
{endregion};
%dlg%)
Comment