473,545 Members | 4,241 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Filter Report Using Pop Up Form

5 New Member
Hi There!

Hoping you are able to help me with a filtering scenario:

I have created a pop up form (Filter) to filter a report (Open Issues), which currently has a number of combo boxes which apply the filters to the fields in the report.

I would like to use this form to filter the report within a date range (Raised Date From and Raised Date To), using unbound text boxes, without having to specify the criteria within the report's underlying query (query is used to create more that one report).

The following is the code I have written for the 5 current combo boxes (Filter1 - Filter 5) I have on the pop up form:
Expand|Select|Wrap|Line Numbers
  1. Private Sub Set_Filter_Click()
  2. Dim strSQL As String, intCounter As Integer
  3. 'Build SQL String
  4. For intCounter = 1 To 5
  5. If Me("Filter" & intCounter) <> "" Then
  6.  
  7. strSQL = strSQL & "[" & Me("Filter" & intCounter).Tag & "]" & "=" & Chr(34) & Me("Filter" & intCounter) & Chr(34) & " And "
  8.  
  9. End If
  10. Next
  11.  
  12. If strSQL <> "" Then
  13. 'Strip Last " And ".
  14.     strSQL = Left(strSQL, (Len(strSQL) - 5))
  15.     'Set the Filter property
  16. Reports![Open Issues].Filter = strSQL
  17. Reports![Open Issues].FilterOn = True
  18. End If
  19. End Sub
How do I add this date range filter to my pop up form?

Any assistance would be greatly appreciated!
Sep 7 '07 #1
1 5610
NeoPa
32,563 Recognized Expert Moderator MVP
Cara,

I'm sorry I didn't find this thread earlier.
There is an article that goes through how to do this sort of thing (Example Filtering on a Form.).
If you haven't given up on theScripts already, check it out and let me know if you still have questions.
Nov 28 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
6457
by: CSDunn | last post by:
Hello, I have a problem with field filtering between an Access 2000 Project form (the application is called CELDT), and the report that shows the results of the filter. Both the form and the report are based on the same View addressed in the Record Source of both as 'dbo.CLMain_vw'. The View resides in a SQL Server 2000 database. There are...
3
6597
by: Richard | last post by:
Hi, I have a form based on a table. When I filter the form I want to run a report based on the same table with the same filter as the form. No problem until I want to filter a combo box where the text value is on a different table. The me.filter is then a text instead of the id-number from the lookup table. This causes the report to prompt...
8
6515
by: dick | last post by:
I am just trying to print/report the results of a "filter by selection" which is done by right-clicking a form, filling in values, and "applying the filter." I have searched the newsgroups, and there are many examples. BUT, they fail sometimes. The techique is to pass the form's Me.filter as the "where condition" in a Docmd.openreport...
3
2894
by: Afton | last post by:
I would like to make a form that filters a report by Supervisor and by starting and ending date. I have the supervisors in a combo box, and that works. However, I do not know how to code to let the user enter a starting and ending date and only show the records between those dates. The code that I have so far does not work for the dates, but...
4
5120
by: Nhmiller | last post by:
This is directly from Access' Help: "About designing a query When you open a query in Design view, or open a form, report, or datasheet and show the Advanced Filter/Sort window (Advanced Filter/Sort window: A window in which you can create a filter from scratch. You enter criteria expressions in the filter design grid to restrict the...
16
18385
by: Nhmiller | last post by:
I already have a report designed under Reports. When I use filtering in Forms or Tables, I see no way to select that filtered list when I am in Reports, and there appears to be no way to do the filtering when I am in Reports. I have received two replies to this message, posted a few days ago within another Subject. One requires making...
1
16369
by: lorirobn | last post by:
Hi, I have a report that works just fine. Now I would like to add the capability to choose selection criteria to limit what is displayed. I created several reports that do this, but they used VBA to create SQL statements, then apply them. Now that I have been using Access/VBA for awhile, I am wondering if there is a simpler way to do...
5
4005
by: DAHMB | last post by:
Hi all, Using Access 2007 I have a report called Sunday School Attendance based on a Query called qryAttendance the query is as follows: SELECT tblSundaySchoolAttendance.StudentID, tblSundaySchoolAttendance.AttendanceDate, . FROM tblSundaySchoolAttendance INNER JOIN ON tblSundaySchoolAttendance.StudentID=.StudentID;
3
2624
by: franc sutherland | last post by:
Hello, I have a report which I filter using the me.filter command in the OnOpen event. Me.Filter = "OrderID=" & Forms!variable_form_name! Me.FilterOn = True I want to be able to open that report, filtered, from different forms. How do I carry the name of the current form into the
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7805
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...
0
7751
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...
1
5323
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...
0
3449
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...
0
3440
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1874
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1012
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
700
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...

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.