sql - Combobox filter on a query not working while Null (in the form only) -


i working on project on ms-access 2010 , struggling issue hours. apply filter on select/pivot statement. result of query displayed in listbox.

the issue no results displayed when combobox set null. when select specific values in combobox works perfectly.

  • the cbbox filter declared parameter
  • my query clause looks :
where (jobs.fk_group=[formulaires]![frm_main]![lst_filtergroup] , (fk_othercritera='xxx'))     or ((([formulaires]![frm_main]![lst_filtergroup]) null)   , (fk_othercritera='xxx')) 
  • the query works while enter manually value of parameter (=when enter empty string, displays records = want)
  • idk if important, listview use swap dynamically recordsource (=it runs 2 differents queries), depending cbbox
  • i checked parameters values vba code before mylistview.requery calls , isnull(mycbboxreference) returns true , other criteria ok.

i have no clue of did wrong, need :-(

best regards, lr

i recommend use special value in combobox displaying records in main table , don't rely on comparing null values. query, probably, doesn't work because empty combobox returns "" , not null.

also careful queries based on references controls/parameters. access has bug: if apply filter on data in form, based on query such kind references, stops read new values controls/parameter during requery. appears @ least subforms in datasheet mode. workaround bug - using function instead of reference.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -