FUNCTION bodegas(cb2) DEFINE ketiquetas SMALLINT, detiquetas CHAR(30), cbodegas ui.ComboBox, cb2 CHAR(2) LET cbodegas = ui.combobox.forname("formonly.bodega") DECLARE bbodegas CURSOR FOR SELECT a.cod_bodega,a.descripcion FROM intb00009 a ORDER BY a.cod_bodega CALL cbodegas.clear() FOREACH bbodegas INTO ketiquetas,detiquetas CALL cbodegas.additem(ketiquetas,detiquetas) END FOREACH IF cb2 ='2' THEN LET cbodegas = ui.combobox.forname("formonly.bodega_destino") DECLARE bbodegas2 CURSOR FOR SELECT a.cod_bodega,a.descripcion FROM intb00009 a ORDER BY a.descripcion CALL cbodegas.clear() FOREACH bbodegas2 INTO ketiquetas,detiquetas CALL cbodegas.additem(ketiquetas,detiquetas) END FOREACH END IF END FUNCTION