I have a database that has employees' first names and last names, but no SSN or employee number. My problem is the prevention of duplicates. I would like to prompt the data entry clerk if the clerk tries to enter any person who is already in the data base. For example: You type in Johnson for last name, then you type in the J for John. I would like a prompt to state in a list box: "There is a Jane Johnson; John Johnson, Jorge Johnson." Direct the user to the edit screen if the name is already in the database. Let the user continue if the employee is not in the database. The row source from the list box looks like this:
Where "Tbl_MEO Information" is the table. Global Letter is the first letter of the Last name. I am testing with pulling up all last names that begin with the same letter. The problem is my form asks me for global_letter. If I type the letter I want the list box works correctly. The trick is to get the above code to accept the global_letter variable and not request it.
I hope I wasn't to long in my description. Any suggestions would be appreciated.
Al
Code:
SELECT [Tbl_MEO Information].ID, [Tbl_MEO Information].[Last Name], [Tbl_MEO Information].[First Name], [Tbl_MEO Information].Inactive FROM [Tbl_MEO Information] WHERE ((([Tbl_MEO Information].[Last Name]) Like [Global_Letter] & "*") AND (([Tbl_MEO Information].Inactive)<>-1)) ORDER BY [Tbl_MEO Information].[Last Name];
Where "Tbl_MEO Information" is the table. Global Letter is the first letter of the Last name. I am testing with pulling up all last names that begin with the same letter. The problem is my form asks me for global_letter. If I type the letter I want the list box works correctly. The trick is to get the above code to accept the global_letter variable and not request it.
I hope I wasn't to long in my description. Any suggestions would be appreciated.
Al