By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,591 Members | 650 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,591 IT Pros & Developers. It's quick & easy.

Filter-by-form + date range filter

P: n/a
Is there any way to include two unbound text boxes (for a start date
and end date) to a filter-by-form? The users may want to filter by
several different fields and they may want to include a date range
search on the one date field. Instead of having the users type in
>=#2004/01/01# AND <+#2006/01/01" into the date field during the filter, I would like to use the two unbound text boxes (dates above are an example, they will change with every filter). Is this even possible?
Aug 16 '06 #1
Share this Question
Share on Google+
6 Replies


P: n/a
Any reason you can't create an unbound form with 2 unbound textboxes
and then open or filter the form based on the textbox contents?

Aug 17 '06 #2

P: n/a
Omit the criteria from the query. Instead, build the Filter for the form
from the boxes where the user actually entered something.

There is an example of how to build that kind of filter, including the date
range, in this article:
Search form - Handle many optional criteria
at:
http://allenbrowne.com/ser-62.html

It includes a sample database you can download to see how it works.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"fonzie" <do*******@yahoo.comwrote in message
news:11**********************@74g2000cwt.googlegro ups.com...
Is there any way to include two unbound text boxes (for a start date
and end date) to a filter-by-form? The users may want to filter by
several different fields and they may want to include a date range
search on the one date field. Instead of having the users type in
>>=#2004/01/01# AND <+#2006/01/01" into the date field during the filter, I
would like to use the two unbound text boxes (dates above are an example,
they will change with every filter). Is this even possible?

Aug 17 '06 #3

P: n/a
I see what you're saying, the problem is if there are 12 - 15 fields on
the form and the user may want to filter by any one or any combination
of those fields. That means I would need to duplicate every field in
the top filter section, correct? The filter by form works perfect for
this, but no date range search. I was hoping there was a way to
combine the two.

Aug 17 '06 #4

P: n/a
You are talking about the built-in Filter By Form?

Can you type an expression into the date field, such as:
Between #1/1/2006 And #12/31/2006#

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"fonzie" <do*******@yahoo.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
>I see what you're saying, the problem is if there are 12 - 15 fields on
the form and the user may want to filter by any one or any combination
of those fields. That means I would need to duplicate every field in
the top filter section, correct? The filter by form works perfect for
this, but no date range search. I was hoping there was a way to
combine the two.

Aug 17 '06 #5

P: n/a
Yes, I am refering to the built in filter-by-form. I was hoping there
was a way that you could combine two unbound boxes for the start date
and end date instead of typing in the BETWEEN statement (for ease of
use for the users). The more I search and read, the more that looks
like the best (only?) solution to do what I want to do. Thanks for
your help.

Aug 17 '06 #6

P: n/a
Perhaps you have outgrown the built-in FBF.

It doesn't work in the runtime/mde, and is way too confusing for users who
try to click command buttons in that view, so I never use it. In most forms,
there's only a handful of controls that the user is likely to want to filter
on, I put controls in the Form Header for just those ones. Looks like the
screenshot on this page:
http://allenbrowne.com/ser-62.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"fonzie" <do*******@yahoo.comwrote in message
news:11**********************@i3g2000cwc.googlegro ups.com...
Yes, I am refering to the built in filter-by-form. I was hoping there
was a way that you could combine two unbound boxes for the start date
and end date instead of typing in the BETWEEN statement (for ease of
use for the users). The more I search and read, the more that looks
like the best (only?) solution to do what I want to do. Thanks for
your help.

Aug 17 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.