Wildcard in form

Franki

Registered User.
Local time
Today, 04:07
Joined
Sep 19, 2000
Messages
12
OK, I need to curb the tendency of an overenthusiastic and somewhat dense attorney to madly add new client identifiers to my
database. For example, although "Smith, John" had already been entered as a valid client name, and a client number assigned, this
attorney (working with a combo box not-in-list event) went ahead and made a new entry for "John Smith Esquire" as a client
name, with client numbers assigned. I need code to populate a message box that will list client names like the ones already entered
to slap this particular attorney upside the head and say "hey, dumbass, the client code has been assigned". How do I alter this code
to accomplish it?

strSQL = "SELECT strClientName FROM tblClients WHERE strClientName [here I need the wildcards encasing the contents of
txtClientName on the form]
 
In your example if you have a client name as Smith, John and you enter John Smith Esquire and use wild cards to see if there is a Smith, John you will not find him. Putting wild cards around John Smith Esquire (Try this in the ClientName criteria field of a qeury: Like "*John Smith Esquire*") will not find Smith, John. If you have only one field for Client Name I would suggest that you consider creating a FirstName, MiddleInitial and LastName field as searching on a single field for all possible combinations could be tricky. What is the difference between John L Smith and John Smith Esquire? There are three distinct parts to the field but the middle bit is an initial in one field and a last name in the next..... Just a thought....
 
Nope -- won't work. The "client name" isn't generally a formal name -- the 3 part names are in the address listing. If we are representing an individual, the client is identified by his or her last name, with a first name included for further clarification; if we are representing a company, it will be a company name or abbreviation for that company; if we are representing a group of people (once a case involved 69 separate plaintiffs) we may identify the "client" by who they are suing (in this case, the initials of a bank).
 

Users who are viewing this thread

Back
Top Bottom