using selection from Filter by Form to filter reports

Karl K

Registered User.
Local time
Today, 21:35
Joined
Feb 2, 2000
Messages
41
I have a database I am converting from Aproach. I would like the ease of creating a filter in a form, then use that filter on (complex) pre-created reports. Something like a button to open reports, but show only the records that are currently filtered. Nowhere can I find anyway to do this! It seems so simple. Approach does it automatically. Can anyone help?
 
I posted a similar question to yours. Read mine in the "Query" section. Dave Mack 2/2/00.

simple way: If you do a FBF in Access, you can save the filter as a Query and base your reports on that Query.

Harder way: You can find the FBF filter string (if you don't close the FBF Form) in the Property sheet of the form under the Data Tab in the field "filter". That looks exactly like the WHERE string I need to concatenate into my module. I don't know how to call that filter propery string into my code.

I'll be watching your Question, you watch mine. I'll share anything I learn from the forum and some of the possible solutions I am working on.

Someone out there please help!

Dave Mack Saratoga, NY
 
I'm hoping someone will be able to help both of us. In the interim, I was able to use some example code from the Access Developer's Handbook. The following code can be added to a button or even on your form after criteria is selected in Filter by Form to return the filter string...effectively the WHERE clause of your SQL string.

' Show the filter, just for fun.
If Len(Me.Filter & "") > 0 Then
MsgBox Me.Filter
Else
MsgBox "No active filter."
End If


Good Luck,

Dave Mack Saratoga, NY

[This message has been edited by David Mack (edited 02-04-2000).]
 

Users who are viewing this thread

Back
Top Bottom