ApplyFilter - more then one

  • Thread starter יריב החביב
  • 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top