database - How to create multiple connected search combo boxes to filter a form? -


i have form 10 columns, , 5 of them (project_phase, contract, design_dpm, amm/ucc, 1_or_2 stat) want add connected drop list combo boxes filter records , display data selected in combo boxes.

i know how make multiple drop list combo boxes filter whole form based on selection of 1 value 1 column. example, "contract" combo box has options: signed, not signed. if select "signed" display records have "signed". , if filter column cancel previous filter , display records relevant selection column.

but want ability filter using number of filtering options 5 columns mentioned. example, if want see records ("signed" under "contract") , in ("proposal" under "project_phase") , ("a dpm" under "design_dpm"). , after filtering want able clear filters , see records again, using form display records users. not want cascaded, might want filter using 1 column or more or all. , not want query or use basic filtering in datasheet view.

sorry lengthy explanation, if not clear explain further. thank efforts.

here 1 way implement form filter using multiple comboboxes.

  1. create table named 'tblwildcard'; 1 field named 'wildcard', save table.
  2. enter 1 record asterisk value
  3. create queries comboboxes like:

    select distinct table1.flda table1 order table1.flda union select wildcard tblwildcard 
  4. save query following sql row source form (i.e. qryforma):

    select table1.flda, table1.fldb, table1.fldb  table1 (((table1.flda) [forms]![frmform1]![cboflda])  , ((table1.fldb) [forms]![frmform1]![cbofldb])  , ((table1.fldc) [forms]![frmform1]![cbofldc]))                           
  5. in after update event each combobox add following code:

    me.recordsource = "qryforma"

  6. sometimes 'me.rowsource.' may not work when changes made (weird issue!). if so, following:

    application.echo false me.recordsource = vbnullstring                     me.recordsource = "rowvwfilter25" application.echo true 
  7. finally, if multi-user environment, , people may adding records need included in comboboxes, use combobox before update event , add following code:

    me.cboflda.requery 

Comments

Popular posts from this blog

SVG stroke-linecap doesn't work for circles in Firefox? -

routes - Laravel 4 Wildcard Routing to Different Controllers -

cross browser - XSLT namespace-alias Not Working in Firefox or Chrome -