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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filter on does not work Access 2007 1

Status
Not open for further replies.

villica

Programmer
Feb 25, 2000
332
CA
Hi everyone

I have an access database that does not longer work in access 2007
I think the problem is here. It does not apply the filter
Reports("rpt sample").Filter = "ID=" & lstCFAMS.Value

villica


villica
 
I haven't used Access 2007 much but in any version I would put a space before and after the equal sign to be more explicit.

Code:
Reports("rpt sample").Filter = "ID = " & lstCFAMS.Value

Also, FilterON may need to be set.

Any reason your not using the where condition of docmd.openquery instead?
 
I'm not sure why you posted the same question in at least two different fora and seemed to have missed the Reports forum. There are several replies in thread702-1543525 so I think this thread should be closed. I fully support PHV's suggestion in the other thread. I don't ever use the type of code you suggested when working with reports.

Duane
Hook'D on Access
MS Access MVP
 
I really haven got an answer and I can not use the open report over as the report is already open

When the report opens up, it has a query as a record source which has every record. Also when the report opens up another little form opens up and with list of names. When I click on any of the names the report used to display only that name and the transaction for that name only instead of every record. At this point the report is already open. I am applying a filter on already open report


Now when I click on any of the names it does not do anything at all. I apologize for not been more specific before.



Lameid, I have already put space and set the filter on. It seems that the filter on works but it also closes the little form


Reports("sample").Filter = "ID = " & lstCFAMS.Value
Reports("sample").FilterOn = True


I will look up how to use the where clause



villica
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top