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

Lost Filter 1

Status
Not open for further replies.

sxschech

Technical User
Jul 11, 2002
1,033
US
I have a report where I hard coded the filter criteria. The reason being is that I didn't want to add additional code in case some time in the future the user wanted to modify the criteria and also to eliminate additional queries. The report was working fine and then today, the filter was gone. Since I didn't want to worry about losing the filter again, I ended up creating another query with the equivalent filter criteria. Has anyone experienced losing the filter? Any way to prevent it from going away short of code or query? Thanks for your thoughts.
 
If you are talking about the Filter Property in the report's property window, that is not absolutely stable. It's actually more of an inherited property from a query or table. You can hardcode the criteria there, but it can be overriden or erased by changes to the underlying table or query. If you opened the table and filtered some records via the menu or object properties then this could affect your report.

Bottom line, if you want a filter on a report or form you need to create a query or set it with VBA at runtime if you want it to always take effect.

ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
Thanks for clearing that up. I'll be more careful in how I use filters in the future, I guess some simple solutions aren't always what they seem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top