PDA

View Full Version : What Code is Missing?


ABC123

forskare
03-09-2008, 12:02 AM
I'm trying to blend code from the Auto Complete xDialog which is:

dim t as p
t = table.open("clients")
dim lastname as c
ui_dlg_box("Auto-complete Example",<<%dlg%
{wrap=100}
{frame=1,1}
{region}
Lastname: | [%A=t.suggest("lastname",value)%.50lastname];
{endregion};
%dlg%)

t.close()

with other code so that the OK and Cancel buttons are included. Obviously, the code is not correct because I get the error message which is shown in red.

-------- MY CODE -------------------

dim t as p
t = table.open("clients")
DIM SHARED varC_result as C
dim lastname as c
ui_dlg_box("Auto-complete Example",<<%dlg%
{wrap=100}
{frame=1,1}
%dlg%)
ok_button_label = "&OK"
cancel_button_label = "&Cancel"
varC_result = ui_dlg_box("Alpha Five",<<%dlg%
{region}
Lastname: | [%A=t.suggest("lastname",value)%.50lastname];
{endregion};
%dlg%)
{region}
<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL> ' Error Message "Expected Value"
{endregion};
t.close()

The line of code is good but there is code missing from another line. Additionally the code may not be in the proper.

Thanks for the help

kenn

Tim Kiebert
03-09-2008, 12:31 AM
Ken,


Dim t as p
t = table.open("client")
dim lastname as c

ok_button_label = "&OK"
cancel_button_label = "&Cancel"

ui_dlg_box("Auto-complete Example",<<%dlg%
{wrap=100}
{frame=1,1}
{region}
Lastname: | [%A=t.suggest("lastname",value)%.50lastname];
{endregion};
{region}
<*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
{endregion}
%dlg%)

forskare
03-09-2008, 11:23 AM
Thank you, Tim :)