Hello Access Gurus:
I use Win98SE and Access97.
I just built a simple Access97 application which holds all contact
information for my personal contacts, such as first name, last name,
address, city, state, etc.
When the user wants to search for a particular record, he does two
things:
1. On the form is a text box on which he enters the text he is searching
for.
2. Then he clicks on an option button to choose which field the search
will be conducted on, e.g., First Name field, Last Name field, etc.
E.g., click the "First Name" option button and type "John" in the text
box to search for records of contacts named John.
Then he clicks a cmdFind button and the code applies a Filter to the
form and finds and displays the record in the underlying table that
contains the text that was entered in the text box.
The trouble is that when I enter an apostrophe in the Search box, I get
the error message "Error 2448. You can't assign a value to this object."
This does not make sense to me because I'm not trying to assign a value
to any object.
I do think I know what is going wrong however. When I put the
apostrophe in the search string, the Filter property does not make sense
because the apostrophe interferes with the proper concatenation of the
different parts of the filter condition (e.g., Me.Filter = SearchField &
" Like '*" & SearchValue & "*'") where SearchValue is the value to be
filtered on, i.e., the value that is entered in the textbox. So if an
apostrophe is entered, the Filter condition is all wrong.
HERE ARE MY TWO QUESTIONS
1. If that's the reason things are going wrong, why do I get error
message "Error 2448. You can't assign a value to this object." It
doesn't seem to make sense based on what the real problem is.
2. Perhaps most importantly:
Is there any resouce on the web that contains Help files that help
developers to understand what causes certain error messages? There's a
ContextID associated with each error message, but where are the help
files that they refer to? They're certainly not part of Access97. If
such a resource existed on the web, it would be of great help to me.
Thanks to anyone who can help me with this.
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!