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

Applying Filters in Access XP AND Access2000

Status
Not open for further replies.

green980

Programmer
Dec 8, 2003
2
US
Hello all,

I have developed an Application in MS Access XP. The application uses filters extensively to open data entry forms. My client is using Access 2000. The forms are working fine in the XP version but I'm getting a "Can't Apply Filter Action" error message in the 2000 version. To make matters more interesting, the apply filter action seems to be working on some of the forms and not on others.

Is there a compatibility problem here? Anyone have ideas?

Thanks!
 
Thought!

I don't have XP so am not sure; however, A2k does have the ability to save in Version 97. You go to tools > database utilities > convert to prior. Maybe XP has something similiar.

HTH

An investment in knowledge always pays the best dividends.
by Benjamin Franklin
 
Did you ever get this resolved? I too have a problem with filters working sometimes & not always. Usually works in XP Office Access, but not in 2000.

Thanks
 
I did come up with a solution although I'm not sure it was the best; however it is working now so...

I created a number of global variables in a module called GlobalProcedures. Go to the modules tab and create a new module. Declare the global variables as:

Global GlblVar1 As Integer
Global GlblVar2 As Integer

where Var is the field name you will be filtering on.

Then, whenever a form was opened that had the potential to open filtered sub-forms, I set the Global field to the field in the form. When a data entry screen was opened, I re-set global variable, set the filter to the global variable and turned the filter on. The key was to make sure the global variable was declared immediately prior to opening a sub-form.

Give a shout if this doesn't make sense and I'll post the actual code used.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top