Via SQL in the OnGridInitiate or OnDialogInitiate


A dropdown control data takes either of these forms:


Company 1|1001

Company 2|1002

Company 3|1003


or


Company 1

Company 2

Company 3


Note that the field deliminator is a pipe charactor.


dim cn as sql::Connection

dim ar as sql::Arguments

dim rs as sql::ResultSet

cn.open("::name::conn")


vsql = "SELECT distinct company,ID FROM vendor WHERE inactive <> 1 ORDER BY company,id"

cn.execute(vsql)

rs = cn.resultset


e.rtc.vendor_lst = rs.tostring(-1,1,.t.,"|")


cn.close()