Avatar of Karl001
Karl001
Flag 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
Microsoft Access

Avatar of undefined
Last Comment
mbizup

8/22/2022 - Mon
Rey Obrero (Capricorn1)

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
mbizup

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes