Ok.
Sylvain, I did it.
Let me show my code.
....
do form lista_descripciones with "elementos","idelemento", "elemento","elemento"
"elementos"=alias
"idelemento"=code
"elemento"=descripcion
"elemento"=Index
In lista_descripciones
Init Event
lparameters lcalias, lccampocodigo, lccampodes, lcindice
public cretval
if parameters() < 4
=messagebox("Faltan parámetros"+chr(13)+chr(13)+;
"calias - alias en que se busca"+chr(13)+;
"ccampocodigo - nombre del campo de código" +chr(13)+;
"ccampodes - nombre del campo de descripción" +chr(13)+;
"cindice - tag para ordenar la tabla",16,c_encmsg)
return .f.
else
if !used(lcalias)
use (lcalias) in 0
set order to tag lcindice
go top
else
sele (lcalias)
set order to tag lcindice
go top
endif
with thisform.lista
.recordsource = lcalias
.codigo.controlsource=lcalias+'.'+lccampocodigo
.descripcion.controlsource=lcalias+'.'+lccampodes
endwith
endif
Unload Event()
return thisform.cretval
OK Bottom (click event)
thisform.cretval = eval(thisform.lista.codigo.controlsource)
thisform.release()
Cancel Bottom (click event)
thisform.cretval =" "
thisform.release()
........
Where do you think is the error.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only