Okay so 2 problems, first I want to apply a filter to a bound form that shows the dates that lie within a specific range. That range is the current year, current month and any day. I can't figure out the correct VBA for it, below is what I have.
DoCmd.ApplyFilter , "[DateEnd] = Between DateSerial(Year(Now()),Month(Now()),1 And DateSerial(Year(Now()),Month(Now()),31"
My second problem is also with filters, I have a button on my form that asks the user to enter a customer name to filter by. A customer name is entered and the filter works fine. But after I toggle to filter off and want to enter a different customer name access seems to keep what I entered first in its memory and will just filter on what value only. I get no prompts to enter a different value, it just holds onto the first value until I close and reopen the form.
How do I fix these 2 things?!?! Any help is very appreciated. Thanks!
DoCmd.ApplyFilter , "[DateEnd] = Between DateSerial(Year(Now()),Month(Now()),1 And DateSerial(Year(Now()),Month(Now()),31"
My second problem is also with filters, I have a button on my form that asks the user to enter a customer name to filter by. A customer name is entered and the filter works fine. But after I toggle to filter off and want to enter a different customer name access seems to keep what I entered first in its memory and will just filter on what value only. I get no prompts to enter a different value, it just holds onto the first value until I close and reopen the form.
How do I fix these 2 things?!?! Any help is very appreciated. Thanks!