Filtering form using Between

  • Thread starter Thread starter Shane S via AccessMonster.com
  • Start date Start date
S

Shane S via AccessMonster.com

Having a little problem with proper syntax on filtering a form using Me.
Filter. I would like to filter the form using 2 text controls; txtStart and
txtEnd (Date fields). I know I need to use BETWEEN, I just can't get all the
# " ' in the right place. Would someone please lend a hand on the proper
syntax for me to pull this off?

Thanks ahead of time,
Shane
 
Finally was able to get a search engine let me search using 'Between' and
found a solution. Just in case someone wants to know what the solution was.

Me.Filter = "[StartDate] Between #" & Me.txtStart _
& "# And #" & Me.txtEnd & "#"
Me.FilterOn = True

Shane
 
Shane said:
Having a little problem with proper syntax on filtering a form using
Me. Filter. I would like to filter the form using 2 text controls;
txtStart and txtEnd (Date fields). I know I need to use BETWEEN, I
just can't get all the # " ' in the right place. Would someone please
lend a hand on the proper syntax for me to pull this off?

Thanks ahead of time,
Shane

Me.Filter = "SomeDateField BETWEEN #" & Me.txtStart & "# AND #" & Me.txtEnd &
"#"
Me.FilterOn = True
 
Back
Top