Filters more than 255 characters

R

Ryan Langton

I have filters I have to apply to an access form that are more than 255
characters:
Division IN ('Administration','Recreation',.... etc. to beyone 255
characters.
When I watch the ServerFilter or Filter properties in my watch list they are
always cut off at 255 characters. Is there any way to use the longer
filters? Also should I be using the Filter or ServerFilter property?
Thanks.

Ryan
 
R

Ryan Langton

Hmmm it does appear the Filters are holding over 255 characters now, it must
have been one of my string variables cutting them off. However, the filters
still seem not to be working. On the form I have Allow Filters = True, but
setting Me.Filter and then doing a Me.Requery does not seem to apply the
filter. Do I have to use the ServerFilter property instead?
 
R

Robert Morley

If you're doing it programmatically, you've probably missed the "Me.FilterOn
= True" part. Just add that right after Me.Filter, and it should be fine.
I believe whenever you execute that, it automatically requeries, but I don't
have Access handy on this computer, so you'll have to test it yourself and
make sure.



Rob
 
A

aaron.kempf

so in which ORDER should you do this?

what is the best way to apply a filter to make sure that it doesnt do
more requerying than it needs.

I mean.. for starters

IF Me.Filter <> "ROWID = 312" Then Me.Filter = "ROWID = 312"
IF Me.FilterOn <> True then Me.filterOn = True

that would be more efficient. RIGHT?

-aaron
 
R

Ryan Langton

Robert,

You're right, I just forgot to set the Me.FilterOn = True.
I went through my code and added that after every Me.Filter = myVar
statement and everything works great now.

Thanks,
Ryan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top