Filling combobox from query

R

redf1re

hello... how can i fill a combobox by vba from a query??

i have a query in a macro that goes like:
Range("E1").Select
With Selection.QueryTable
.Connection = Array(Array( _
"ODBC;DSN=TURMALINA;Description=TURMALINA;;;APP=Microsof
Office 2003;WSID=GENERATOR;DATABASE=JDE_DEVELOPMENT;Network=DBMS" _
), Array("SOCN;AutoTranslate=No;UseProcForPrepare=0"))
.CommandText = " SELECT F58001.PDDSCA " & _
" FROM JDE_DEVELOPMENT.TESTDTA.F58001 F58001 WHER
F58001.PDPRJCOD = '" & Worksheets(1).Range("AB1").Value & "'"
.SavePassword = True
.Refresh BackgroundQuery:=False
End With

and i want to fill the combobox from teh result of this query.... ho
can i do that???
anyone can help me please
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top