Question Combo boxes prevent duplicate names

Joe8915

Registered User.
Local time
Today, 12:43
Joined
Sep 9, 2002
Messages
820
I have attach the sample db.

On the Create a New Batch forms. I do not want the user to choose duplicate names on one record. See 1st record.

I have to have drop downs for all the individual employees, due to different time’s different pay as well as different employees with a combination with other employees will call for a different pay.

How can I prevent this?


Thanks
 

Attachments

Last edited:
I found this piece of code that might work. I place this code in the Before Update

'make sure you have two names entered first
if len(txtfirstname)>0 and len(txtlastname)>0 then
if nameexists(txtfirstname, txtlastname) then
call msgbox("The selected name is a duplicate ...")
cancel=vbcancel
end if
end if


Not being good at code, I received a error message: Any ideas
 

Users who are viewing this thread

Back
Top Bottom