Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help on ApplyFilter

Status
Not open for further replies.

cin2002

Programmer
Mar 19, 2002
29
US
I would like to filter the report without open it.
I tried as following:
DoCmd.SelectObject acQuery, "qryName", True
DoCmd.ApplyFilter , "[date] Between #01/01/02# And #04/11/02#"

I get a run-time error '2488': You can't use the applyFilter action on this wonder.

Anyone can help me solve the problem?
 
I assume this is Report_Open code. Change it to
Me.filter = "[date] Between #01/01/02# And #04/11/02#"

(if you actually have a variable called "Date" - even "MyDate" would be an improvement :) )

 
But I don't want to open the Report. As I say, I want to make the filter without open the report because I need to export the report to excel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top