A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Report Filter ? Clear Filter & Return to Full Report



 
 
Thread Tools Display Modes
  #1  
Old April 28th, 2005, 04:36 PM
Brook
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 03:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.