I have a fairly intense dialog, where I need to test everything before moving on to the next item. My first item is a multi-select list box. I want to test whether something was checked and set focus back to it if not. The test is on the setfocus event of the next control, a date. My test does determine that nothing was checked, however I can't seem to set focus back to the list box. Can anyone see what could be the problem? the attached code snippet will show the example.
Thanks in advance.
The result of the "ui_ctl_goto" is Positive (.T.), however, the cursor stays in the date field. How can I get the cursor to get out of the date field?
Tom
Thanks in advance.
Code:
DIM a_progs[4] as c temp_list = <<%list% SNAP (FoodStamps) TANF or GA Medicaid %list% ok_button_label = "&OK" cancel_button_label = "&Cancel" a_progs.initialize(temp_list) varC_result = ui_dlg_box("Interview Appointments",<<%dlg% {region} Select Programs Applied for:| [%M%.30,5progs^$a_progs]; {endregion}; {lf}; {region}; Enter Appointment Date: [%DATE;P=popup.calendar(dtoc(v_DATE));I=popup.calendar%.15v_DATE!v_DATE_*]; {endregion}; {region6} {frame=1,1: ERROR MESSAGES } {font=arial,9,b}{text=72,4:ERR_MSG}{font=arial,8,n}; {lf}; {endregion6}; {line=1,0}; {region} <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL> {endregion}; %dlg%,<<%code% if left(a_dlg_button,7) = "v_Date_" if a_dlg_button = "v_date_setfocus" if alltrim(progs)="" err_msg = "Please select a Program" a_dlg_button = "" rslt = ui_dlg_ctl_goto("Interview Appointments","progs") IF RSLT = .t. ERR_MSG = eRR_MSG+CRLF()+"gOOD rETURN" else ERR_MSG = eRR_MSG+CRLF()+"Bad rETURN" end if end if end if a_dlg_button="" end if %code%)
Tom
Comment