Question : MS Access set combo box values dynamically at runtime

I'm looking to set up a combo box that will have a dynamic list of values based on whether certain items are assigned or active.  I want the combo box to only include values from the table if from the table if its status is active.  I envision the combo box values being filled either on form load or when clicking the combo box.  Any help would be greatly appreciated.

Form name = frmEmployees
Combo box = cmbTempCardNo
Table w/ values = tblTemporaryCards

Thanks, Gary

Answer : MS Access set combo box values dynamically at runtime

private sub form_load()

me.cmbTempCardNo.rowsourcetype="table/query"
me.cmbTempCardNo.rowsource="select fld1,fld2 from tblTemporaryCards where [status]='Active'"


end sub
Random Solutions  
 
programming4us programming4us