I wouldn't have thought that I would spend all day trying to make the xdialog event killfocus work, but I did. I would still be here except that I FINALLY, through a bizillion trials and errors, discovered that it does not and will not fire on a comb box field. Who would have thunk. It works on text and list fields. I haven't yet run out of 4 letter explicatives about this one!!!
Code:
' field variables dim vdoc_no as C dim vdoc_scope as C dim vLDS as C="Institution"+crlf()+"Department" dim vclass as C dim vLnums as C=comma_to_crlf("one,two,three,four,five,six") ' dialog variables dim vresult as C dim dlg_title as C="Document Entry" dim dlg_body as C dim dlg_code as C ' build the dialog dlg_body = <<%dlg% {region} {lf}; Doc Class: | {initial_focus} [.20vclass!fdcev_*]; Document Scope: | [.14vdoc_scope^+vLDS!fdsev_*]; List: | [.16,6vdoc_no^#vLnums!lnuev_*]; Document Number: | [.10vdoc_no]; {endregion}; {lf}; {lf}; {justify=center}<15OK> <15Cancel> %dlg% dlg_code=<<%code% ' DOCUMENT SCOPE IF left(a_dlg_button,6)="fdcev_" if a_dlg_button = "fdcev_killfocus" vclass="Class Autofill" msgbox("Class kill") end if a_dlg_button="" END IF IF left(a_dlg_button,6)="fdsev_" if a_dlg_button = "fdsev_killfocus" msgbox("Scope kill") end if a_dlg_button="" END IF IF left(a_dlg_button,6)="lnuev_" if a_dlg_button = "lnuev_change" msgbox("List Selection Made") end if if a_dlg_button = "lnuev_killfocus" msgbox("list kill") end if a_dlg_button="" END IF if a_dlg_button="OK" end end if %code% vresult=ui_dlg_box(dlg_title, dlg_body,dlg_code)
Comment