Please help with search

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form where the user enters a client name (First, Last, and Middle
Initial). Sometimes, a client comes after few years to reopen a file.
However, when the client gives his/her name he writes it with accent for
example (e or é) or hyphened. I need to search in the database to find out if
this client 's been here before. Due to the fact that the name was spelled
differently because of the accent or the hypnen, the database can not find
it. Can someone help me to fix this problem.
Thanks
Al
 
Al,

why not open a new form for which the user will input the last name of the
client.

You could then use something like this to search for previous entries....

=================

Dim stLinkCriteria

stLinkCriteria = "[LastName} Like '" & "*" & Me.SearchText & "*'"
DoCmd.OpenForm YourFormNameHere, , , stLinkCriteria


=================

If your user enters 'Fred' for example, this should return all entries that
have 'fred' in them, such as:

Fredrick
Somefredguy
Ifredik


Of course this could return more records than the user want to see.

Fill in the rest for error handling, what have you....


HTH
 
How about the accent? This will not catch À if A is typed and so on.
Al

Paul B. said:
Al,

why not open a new form for which the user will input the last name of the
client.

You could then use something like this to search for previous entries....

=================

Dim stLinkCriteria

stLinkCriteria = "[LastName} Like '" & "*" & Me.SearchText & "*'"
DoCmd.OpenForm YourFormNameHere, , , stLinkCriteria


=================

If your user enters 'Fred' for example, this should return all entries that
have 'fred' in them, such as:

Fredrick
Somefredguy
Ifredik


Of course this could return more records than the user want to see.

Fill in the rest for error handling, what have you....


HTH




Al said:
I have a form where the user enters a client name (First, Last, and Middle
Initial). Sometimes, a client comes after few years to reopen a file.
However, when the client gives his/her name he writes it with accent for
example (e or é) or hyphened. I need to search in the database to find out if
this client 's been here before. Due to the fact that the name was spelled
differently because of the accent or the hypnen, the database can not find
it. Can someone help me to fix this problem.
Thanks
Al
 
Back
Top