'------------------------Em ADO
Function RecordBD(combo As ComboBox)
combo.Clear
Set TA = New ADODB.Recordset
TA.LockType = adLockOptimistic
TA.Open "Select * from Tabela", Db, adOpenDynamic
Do Until TA.EOF
combo.AddItem TA!field
TA.MoveNext
Loop
End Function
'-----------------------EM DAO
Function RecordBD(Combo as Combobox)
combo.clear
set tb = db.openrecordset("Tabela")
tb.moveMin
do until tb.eof
combo.additem tb!Field
tb.movenext
loop
end function
'---------------Chamando função no form_load
recordbd(combo1) 'tanto em ado como em dao