with this.cboSelTowns .RowSource = '' .RowSource = m.lcSelect .requery() lnSelect = select() select curSwitchTowns index on town tag town seek m.tcTown .ListIndex = recno() select (m.lnSelect) endwith>>Hi everybody,
>>lparameter tcState, tcTown >>local lcState, lcSelect, lcTown >>if vartype(m.tcState)<>"C" >> lcState='' >>else >> lcState = m.tcState >>endif >>if vartype(m.tcTown)<>"C" >> lcTown='' >>else >> lcTown = m.tcTown >>endif >>lcSelect=[select towns.fullname as city, towns.State, ] + ; >> [towns.ccode, postregn.joiningtwn as Town ] + ; >> [from postregn, towns where postregn.joiningtwn = towns.town ] + ; >> [and postregn.town = '] + m.lcTown + [' ] + ; >> [union select towns.FullName as city, Towns.State, ] + ; >> [Towns.ccode, Towns.town from Towns ] + ; >> [where town='] + m.lcTown + [' ] + ; >> [union select padr('< blank >',20) as city, space(2) as State, ] + ; >> [space(2) as ccode, space(4) as town from Towns ] + ; >> [where town='ACTO' ] + ; >> [into cursor curSwitchTowns order by 1] >>with this.cboSelTowns >> .RowSource = '' >> .RowSource = m.lcSelect >> .requery() >>endwith>>