Alpha Video Training
Results 1 to 2 of 2

Thread: Dialog "Cancel" Button does not stop scr

  1. #1
    Real Name
    Hoyt Stepp
    Join Date
    Dec 2003
    Juneau, Alaska

    Default Dialog "Cancel" Button does not stop scr

    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 IF

    but still does not work, can anyone help?

    '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 =".this"
    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}listed alphabetically:{endregion}|
    (vcTest:DV ORDER);
    (vcTest:FALSE REPORTS);
    "*15=ok_button_label!OK" "15=cancel_button_label!CANCEL"

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000

    Default RE: Dialog

    The script you posted does not seem complete. You should post a working "model" of the database so that we can see the entire script functioning in context.

    There's a difference between the concept of closing the dialog and ending the script. These are not synonymous. In most xdialog dialogs the cancel button simply closes the dialog while leaving "Cancel" in the variable a_dlg_button. Subsequent portions of the script can then examine that variable and branch accordingly.

    -- t

Similar Threads

  1. Can a button cancel the "on exit" event?
    By hpjrt in forum Alpha Five Version 5
    Replies: 2
    Last Post: 11-03-2003, 04:26 AM
  2. Msg Box "OK, Cancel" a script - Solution
    By John Gamble in forum Alpha Five Version 5
    Replies: 0
    Last Post: 09-02-2002, 12:03 PM
  3. How to "exit" the record on a cancel?...
    By Jeff Klages in forum Alpha Five Version 4
    Replies: 8
    Last Post: 04-02-2002, 06:27 AM
  4. Stop the "Printing box"
    By Terry Morgan in forum Alpha Five Version 4
    Replies: 5
    Last Post: 11-12-2001, 08:35 AM
  5. "CLOSE" button on dialog
    By Bill Warner in forum Alpha Five Version 4
    Replies: 4
    Last Post: 09-29-2000, 05:12 AM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts