Here's my sample database
EDIT: this is why I use queries and not filters. Queries are sooooooo much easier to handle.
Here's my sample database
EDIT: this is why I use queries and not filters. Queries are sooooooo much easier to handle.
Thanks again rpeare, this is what worked for me:
Function inventoryrptfilter()
On Error GoTo inventoryrptfilter_Err
Dim sFilter As String
If Me.Filter = "" Then
MsgBox "Apply a filter"
Else
sFilter = Me.Filter
DoCmd.OpenReport "INVENTORYreport1", acViewPreview
With Reports![INVENTORYreport1]
.Filter = sFilter
.FilterOn = True
End With
DoCmd.OpenReport "INVENTORYreport1", acViewPreview
End If
inventoryrptfilter_Exit:
Exit Function
inventoryrptfilter_Err:
Me.Filter = ""
MsgBox Error$
Resume inventoryrptfilter_Exit
End Function
It's got some crazy shxt in it, like opening the report, and then opening the report again, but it is working so far. Since I have some 50 or 60 filters like this in my app, I don't want to go changing them to queries.
Anyway I do appreciate your replies, with this 2010 thang, lots of folks like me will be a using forums like this for a while and a half. So go ahead, and make my day.