If you also want to do both and 1 filter of each...
Filters:
dates only
entities only
dates and entities
The filter may have to do some logic when user clicks a 'go' button:
Code:
select case true
case not isnull(txtEntity) and not isnull(txtStartDate)
vFilter = "[entity] ='" & txtEntity & "' and [date] between #" & txtStartDate & "# and #" & txtEndDate & "#"
case not isnull(txtEntity)
vFilter = "[entity] ='" & txtEntity & "'"
case not isnull(txtDateStart)
vFilter = "[date] between #" & txtStartDate & "# and #" & txtEndDate & "#"
end select
me.filter = vFilter
me.filteron = true