G
Guest
Hello all. To me this seems like a silly question; but, I can't seem to get
around some problems using Form.Filter:
More often than not I randomly get an error 2055 when I change the filter of
a form. The filter is fairly complex; but, it sometimes works. It's over 500
bytes long.
I've tried assigning an empty string to the property before setting it, and
I've tried turning the filter off first; but, I can't seem to get around this
error.
This is my latest code:
Me.FilterOn = False
Me.Filter = ""
Me.Filter = "(((Table1.field1=""Ofq"") AND (Table1.field2=""Asdfr
Pagsdre"")) " _
& "OR ((Table1.field1=""123456"") AND (Table1.field2=""Asdfr Pagsdre""))
" _
& "OR ((Table1.field1=""654321"") AND (Table1.field2=""Asdfr Pagsdre""))
" _
& "OR ((Table1.field1=""615243"") AND (Table1.[field three]=""Asdfr
Pagsdre"")) " _
& "OR ((Table1.field1=""folr kler kruifd"") AND (Table1.[field
three]=""Asdfr Pagsdre"")) " _
& "OR ((Table1.field1=""hjk g drf"") AND (Table1.[field three]=""Asdfr
Pagsdre"")) " _
& "OR ((Table1.field1=""ldkgi jflghjdffe"") AND (Table1.[field
three]=""Asdfr Pagsdre"")))"
Me.FilterOn = True ' exception 2005 here.
The error description is:
The expression 'The expression '03="Asdfr Pagsdre")) OR ((field1="folr kler
kruifd") AND (field 03="Asdfr Pagsdre")) OR ((field1="hjk g drf") AND (field
03="Asdfr Pagsdre")) OR ((field1="ldkgi jflghjdffe") AND (field 03="Asdfr
Pagsdre")))' you entered is invalid' you entered is invalid.
There's a couple of strange things in the description, one being the
repeated "The expression"; but more strange is the truncation and
modification of the filter string. All the Table1. prefixes have been
removed and the field delimiters ('[' & ']') have also been removed.
Thanks for any help
around some problems using Form.Filter:
More often than not I randomly get an error 2055 when I change the filter of
a form. The filter is fairly complex; but, it sometimes works. It's over 500
bytes long.
I've tried assigning an empty string to the property before setting it, and
I've tried turning the filter off first; but, I can't seem to get around this
error.
This is my latest code:
Me.FilterOn = False
Me.Filter = ""
Me.Filter = "(((Table1.field1=""Ofq"") AND (Table1.field2=""Asdfr
Pagsdre"")) " _
& "OR ((Table1.field1=""123456"") AND (Table1.field2=""Asdfr Pagsdre""))
" _
& "OR ((Table1.field1=""654321"") AND (Table1.field2=""Asdfr Pagsdre""))
" _
& "OR ((Table1.field1=""615243"") AND (Table1.[field three]=""Asdfr
Pagsdre"")) " _
& "OR ((Table1.field1=""folr kler kruifd"") AND (Table1.[field
three]=""Asdfr Pagsdre"")) " _
& "OR ((Table1.field1=""hjk g drf"") AND (Table1.[field three]=""Asdfr
Pagsdre"")) " _
& "OR ((Table1.field1=""ldkgi jflghjdffe"") AND (Table1.[field
three]=""Asdfr Pagsdre"")))"
Me.FilterOn = True ' exception 2005 here.
The error description is:
The expression 'The expression '03="Asdfr Pagsdre")) OR ((field1="folr kler
kruifd") AND (field 03="Asdfr Pagsdre")) OR ((field1="hjk g drf") AND (field
03="Asdfr Pagsdre")) OR ((field1="ldkgi jflghjdffe") AND (field 03="Asdfr
Pagsdre")))' you entered is invalid' you entered is invalid.
There's a couple of strange things in the description, one being the
repeated "The expression"; but more strange is the truncation and
modification of the filter string. All the Table1. prefixes have been
removed and the field delimiters ('[' & ']') have also been removed.
Thanks for any help