473,796 Members | 2,599 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filter-by-form + date range filter

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
6 8366
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
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*******@yaho o.comwrote in message
news:11******** **************@ 74g2000cwt.goog legroups.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
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
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*******@yaho o.comwrote in message
news:11******** **************@ m73g2000cwd.goo glegroups.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
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
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*******@yaho o.comwrote in message
news:11******** **************@ i3g2000cwc.goog legroups.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
6091
by: BlackFireNova | last post by:
Using Access 2002 I am writing a report which draws data from several different tables. I can't link all the tables in a query, as some can not be related without truncating the data. I plan to use sub-queries and sub-reports to filter and display the data in the unrelated tables in my report. The common information is a user-inputed date range. I want to avoid having the user prompted for the and variables repeatedly. Somehow I...
1
3999
by: irfanali | last post by:
Hallo All, This is a Tool i m tryin to develop at work. I will explain how it works and then the Q I download a report from my ERP Tool on a daily basis and upload it into the Access Tool. This report gives me the accounting bookings made on a daily basis. So it has fields like Invoice Nr, Invoice Amount, and Date. Well, then i have a Duplicate Query set up to give me a report for all Duplicates...and then i download it into an...
1
9535
by: jon everly | last post by:
I have Excel 2003 and am using the Microsft Query function to pull in data via SQL from a database. However, I want to set a filter on the data that only pulls in dates between Today and 14 days ago. Query does not recognize NOW() or TODAY(). I do I write the SQL statement to only pull data within a given date range (Today and 14 days ago)? Thanks, J
19
3929
by: ali3n8 | last post by:
Hello I have attempted to create a date range report from a query called qrycustomerinformation. The field that contains the value of my date is called Followup. When i run a report on this it is fine. But I have decided I would like to pull this report for a specific date range. Ive attempted to use the method on allen brownes page http://allenbrowne.com/casu-08.html. I would like to also mention the followup field also uses this code to...
3
3025
by: kmnotes04 | last post by:
Could anyone tell me how to restrict the date range for items that appear on a report? Old items from previous years appear on the report. I was asked to have only this year's items (and beyond) listed on the report. How do I do that?
3
3268
by: 6afraidbecause789 | last post by:
If able, can someone please help make a Where clause that strings together IDs in a multi-select listbox AND includes a date range. I wasn’t thinking when I used the code below that strings together the IDs of Clients from a multi-select listbox in an unbound text field, txtCriteria, on a form that is used to pick different reports. It appears that I now have so many clients that I’ve reached the 255 character limit in the txtCriteria...
12
3276
smithj14
by: smithj14 | last post by:
I have a form to enter start and end dates then select a worker name to filter a report. This all works fine and when the report is open in preview mode it shows the date range in the txtboxes on the report header, but when I print the report the value for these txtboxes are #Name? Here is the code Date Range Form: Private Sub cmdViewErrorReport_Click() Dim stDocName As String Dim stDocName2 As String Dim stWhere As String...
3
5342
by: NewbieAccessor | last post by:
Hello! I have only been using Access for 24 hours and need some help!! I have a Query that has totalled the number of unique Projects allocated to my group. This is good! Now, this total, I need to maintain it - but then also break it down into when the Projects were allocated per month. What I've done is copied the Grand Total column and pasted it 12 times to the right of the total colum and changed the Caption to Jan through Dec.
45
3063
AccessIdiot
by: AccessIdiot | last post by:
Sorry, wasn't sure how to phrase the question but here's the situation: I have a form that allows a user to apply a variety of filters to a report. One of the filters is a date range where user can enter either start date, or start/end date to confine the range. In the table that is bound to the report the date field is formatted mm/dd/yyyy. In the code on the form I am using the following: Const conJetDate = "\#mm\/dd\/yyyy\#" 'and...
0
9524
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10217
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9047
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5440
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.