H
h0pal0ng
Hi, I have a problem and I'm hoping people here can help me.
I have a Access 2007 Database with a table with a field Surname. I have
added a module to the project and wrote a public Soundex function which takes
a string input and processes it into a 4 character Soundex code.
What I want to be able to do is create a query that will bring back soundex
matches in the table.
Two possible ways of doing this come to my mind - either have a calculated
field in the table itself and then just query the field as normal - but I'm
not sure how to do trhis in Access (or even if it's possible) or create a
query which has the calculation included and then access the query as if it
was a table. I've tried the latter method but then I create the last query
and try to put the WHERE clause in:
WHERE ((([Query - Personal Member Details with
soundex].[SoundName])=SOUNDEX([Enter Member Name])))
I get the error message "This expression is typed incorrectly, or it is too
complex to be evaluated. For example, a numeric expression may contain too
many complicated elements. Try simplifying the expression by assigning parts
of the expression to variables. (Error 3071)"
Now if I just add a field to the table and manually populate it, a similar
style query directly on the table seems to work - no error and a valid
result. Using this method is possible but I would then need to know the best
way of getting the SoundName field to automatically repopulate when the
Surname field is changed.
So I hope to hear soon from you.
Thanks for all your help,
Shane
I have a Access 2007 Database with a table with a field Surname. I have
added a module to the project and wrote a public Soundex function which takes
a string input and processes it into a 4 character Soundex code.
What I want to be able to do is create a query that will bring back soundex
matches in the table.
Two possible ways of doing this come to my mind - either have a calculated
field in the table itself and then just query the field as normal - but I'm
not sure how to do trhis in Access (or even if it's possible) or create a
query which has the calculation included and then access the query as if it
was a table. I've tried the latter method but then I create the last query
and try to put the WHERE clause in:
WHERE ((([Query - Personal Member Details with
soundex].[SoundName])=SOUNDEX([Enter Member Name])))
I get the error message "This expression is typed incorrectly, or it is too
complex to be evaluated. For example, a numeric expression may contain too
many complicated elements. Try simplifying the expression by assigning parts
of the expression to variables. (Error 3071)"
Now if I just add a field to the table and manually populate it, a similar
style query directly on the table seems to work - no error and a valid
result. Using this method is possible but I would then need to know the best
way of getting the SoundName field to automatically repopulate when the
Surname field is changed.
So I hope to hear soon from you.
Thanks for all your help,
Shane