Link to home
Start Free TrialLog in
Avatar of Karl001
Karl001Flag for Canada

asked on

ComboBox base on an other one

Hi,

2 comboBox : filtInst and filtOff

ComboBox "filtOff" depend on the value of comboBox "filtInst".
To do it, i use    Forms]![frm_Resen]![filtInst])

If the comboBox "filtInst" is empty, I would like to see all value of "filtOff".

How this can be done?

Thanks
Avatar of Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1)
Flag of United States of America image

use vba codes to set the rowSource of the combo filtOff in the afterUpdate event of combo filtInst

private sub filtInst_afterupdate()

if me.filtInst & ""="" then
   me.filtOff.rowsource="select f1,f2 from tablex"
   else
  me.filtOff.rowsource="select f1,f2 from tablex where f1=" & me.filtInst
end if


end sub
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial