Thanks to the forums I recieved the answer for filling all textboxes with this code but is there a way to fill all comboboxes as well

dim ctrl as control
for each ctrl in controls
if typeof ctrl is textbox and not trim(ctrl.tag) ="" then
set ctrl.datasource=rs
ctrl.datafield=rs.fields(ctrl.tag)
end if
next ctrl