If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Report Filter ? Clear Filter & Return to Full Report
I have a form to filter a my rptinventory:
everything is working fine, I set my properties and set the filter and the report filters properly, but what I sould like to do, is on the "Clear" function it clears my Filter properties, but I would like the clear to also clear and return the report to original format with no filters? Any suggestions? Here is my coding for my frminventorysearch Begin Code: Private Sub Command28_Click() Dim strSQL As String, intCounter As Integer 'Build SQL String For intCounter = 1 To 5 If Me("Filter" & intCounter) "" Then strSQL = strSQL & "[" & Me("Filter" & intCounter).Tag & "] " & " = " & Chr(34) & Me("Filter" & intCounter) & Chr(34) & " And " End If Next If strSQL "" Then 'Strip Last " And " strSQL = left(strSQL, (Len(strSQL) - 5)) 'Set the Filter property Reports![rptInventory].Filter = strSQL Reports![rptInventory].FilterOn = True Else Reports![rptInventory].FilterOn = False End If End Sub Private Sub Command29_Click() Dim intCouter As Integer For intCouter = 1 To 5 Me("Filter" & intCouter) = "" Next End Sub Private Sub Command30_Click() DoCmd.Close acForm, Me.Form.Name End Sub Private Sub Form_Close() DoCmd.Close acReport, "rptInventory" DoCmd.Restore End Sub Private Sub Form_Open(Cancel As Integer) DoCmd.OpenReport "rptInventory", A_PREVIEW DoCmd.Maximize End Sub End Code ***** |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to filter report (based upon a query) from a Option box on a f | Bill | Setting Up & Running Reports | 7 | April 28th, 2005 04:26 AM |
Help!! I'm running around in circles! | CathyA | New Users | 19 | December 12th, 2004 07:50 PM |
Filter report | jonathan brown | Setting Up & Running Reports | 2 | September 23rd, 2004 05:10 AM |
Filter Report by Form | Kevin McBrearty | Running & Setting Up Queries | 2 | September 3rd, 2004 03:49 PM |
Specify Filter criteria before running report | Nikos Yannacopoulos | Setting Up & Running Reports | 3 | June 25th, 2004 09:36 PM |