By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,847 Members | 3,068 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,847 IT Pros & Developers. It's quick & easy.

Preventing Duplicate entries

P: 2
Goodmorning all -

I created a form where you enter employee skillsets. There are about 15 different skills and the employees choose the skills they have from the list.

I have created a field for each skill in the form. My question is how can I prevent an employee from choosing the same skill in the fields. For example I do not want the employee to be able to fill all the 15 fields with Accounting as his skillset. Once he chooses Accounting, the next time he selects it -he should get a message stating "Duplicate Entry,Select Another Skill"

I am not a programming person so any help in this will be appreciated very much. I tried my hand in Programming -but I seem to have made it worse.

Thanks again.
Aug 29 '06 #1
Share this Question
Share on Google+
3 Replies


ADezii
Expert 5K+
P: 8,616
Goodmorning all -

I created a form where you enter employee skillsets. There are about 15 different skills and the employees choose the skills they have from the list.

I have created a field for each skill in the form. My question is how can I prevent an employee from choosing the same skill in the fields. For example I do not want the employee to be able to fill all the 15 fields with Accounting as his skillset. Once he chooses Accounting, the next time he selects it -he should get a message stating "Duplicate Entry,Select Another Skill"

I am not a programming person so any help in this will be appreciated very much. I tried my hand in Programming -but I seem to have made it worse.

Thanks again.
The skills which a certain Employee possesses can be a related Table to the Employee Table (1 ==> M). It would now be a simple matter to Index this Skill field with No Duplicates allowed. Hope this helps.
ADezii
Aug 29 '06 #2

P: 2
The skills which a certain Employee possesses can be a related Table to the Employee Table (1 ==> M). It would now be a simple matter to Index this Skill field with No Duplicates allowed. Hope this helps.
ADezii
Thanks -I still have the problem -the issue I have is -the Employee selects the Skills from the table -He or She would open a new form -enter their names, skill level etc and then select the Applicatons based on their level. Each Application is assigned a field and I could never figure out how to prevent duplicates on each field -I tried the Indexing and it would not work.

Thanks
Aug 30 '06 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
Are you assigning a brand new field everytime an employee chooses a new application. Why not create a join table between the employee and skillset tables. That is tblHasSkills with a primary key of EmployeeID and SkillID.

If you set it up this way the system won't allow a duplication of the primary key. Therefore an employee cannot pick the same skill more than once.

Thanks -I still have the problem -the issue I have is -the Employee selects the Skills from the table -He or She would open a new form -enter their names, skill level etc and then select the Applicatons based on their level. Each Application is assigned a field and I could never figure out how to prevent duplicates on each field -I tried the Indexing and it would not work.

Thanks
Aug 30 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.