ApplyFilter - more then one

  • Thread starter Thread starter יריב החביב
  • Start date Start date
×

יריב החביב

Hello,

Once, i have got here from allen browne the method to ApplyFilter with

more then one categorys and it work good, but not when one

of the category is date and the other number. how can it be done ?

here what allen gave

strWhere1 = "(SaleryYear = " & Forms!FHachnasesyotMain!shana & ")"
strWhere2 = "(Salerymonth = " & Forms!FHachnasesyotMain!hodesh & ")"
strWhere = strWhere1 & " and " & strWhere2
DoCmd.OpenForm "FHachnasesyotFill", WhereCondition:=strWhere


Thank you
 
Thank you volker,

Can you show me how to convert ?

I did this but it asking me to type the date

strWhere3 = "#" & " & Forms!Fmain!Combo0 & " & "#"
strWhere1 = "(Contract = """ & Forms!Fmain!List77 & """)"
strWhere2 = "( Salery_Month < strWhere3 or Salery_Month = strWhere3 )"
strWhere = strWhere1 & " and " & strWhere2
 
Back
Top