Local lcSQL This.AddProperty("aKeyaccmgr(1)") *----------------------------------------------------------------- *-- JMW - May 27, 2003 *-- Get KeyAcctMgr data by region *----------------------------------------------------------------- Select mgrname, id ; from keyaccmgr ; where geo_area = m.us_geo_area ; into array This.akeyaccmgr ; order by mgrname *----------------------------------------------------------------- *-- JMW - May 27, 2003 *-- Set the combobox attributes *----------------------------------------------------------------- With this .rowsourcetype = 5 && Array .rowsource = This.akeyaccmgr .BoundColumn = 2 .BoundTo = .T. .ControlSource = "Sponsor.Keyaccmgrid" .ColumnCount = 2 .ColumnLines = .f. .ColumnWidths = "200,0" .Requery() Endwith Return>James,
> >>Local lcSQL >> >>*----------------------------------------------------------------- >>*-- JMW - May 27, 2003 >>*-- Get KeyAcctMgr data by region >>*----------------------------------------------------------------- >>lcSQL = ; >> "Select mgrname, id " + ; >> "from keyaccmgr " + ; >> "where geo_area = m.us_geo_area " +; >> "into cursor c_keyaccmgr " + ; >> "order by mgrname" >> >>*----------------------------------------------------------------- >>*-- JMW - May 27, 2003 >>*-- Set the combobox attributes >>*----------------------------------------------------------------- >>With this >> .rowsourcetype = 3 && SQL Statement >> .rowsource = lcSQL >> .BoundColumn = 2 >> .BoundTo = .T. >> .ControlSource = "Sponsor.Keyaccmgrid" >> .ColumnCount = 2 >> .ColumnLines = .f. >> .ColumnWidths = "200,0" >> .Requery() >>Endwith >> >> >>Return >>