fiogf49gjkf0d For legacy it would be something like this:
(This is mostly from memory so not 100% sure this will run )
Dim hnd As Long Dim r As String Dim listname As String Dim sql As String listname = "Opportunity Status" sql = "select p1.text from picklist p1 left outer join picklist p2 " & _ "on (p1.picklistid = p2.itemid) where p2.picklistid = 'PICKLISTLIST' " & _ "and p2.text = '" & listname & "'" hnd = DBOpenSql(sql, True) r = DBMoveTo(hnd, "BOF") WithObject "ComboBox1" ListClear "Items" While Not DBEOF(hnd) ListAdd "Items", DBGetValue(hnd, "text") r = DBMoveTo(hnd, "Next") Wend EndObject DBClose hnd
Well, hopefully that works, but at least should give you a good place to start. |