forms in access

P

prav_123

I am setting up a database of individuals- I have set up a form to do this
and I want to know how to prevent if more than one form is completed for the
same individual in error- possible to set up a dialog box to warn me of a
duplicate record?
 
P

prav_123

Thank you for sending me code details (student job outcome results)to prevent
duplication- this is basically what I really need.HoweverI do not have the
equivalent of a student number- I was hoping to use date of birth and surname
as parameters;this would not be foolproof but it would serve my needs- how do
you introduce more than one parameter in the code and how isthe code linked
to the forms/table - I am a real novice.Please help.Thanks.I have tried to
substitute student number with date of birth but it has not worked.
 
O

Ofer

If that the criteria you have in the sample
stLinkCriteria = "[strStudentNumber]=" & "'" & SID & "'"

To match it to your needs, try something like

stLinkCriteria = "[SurName]='" & Me.[SurName] & "' And [DateOfBirthField]=#"
& Me.[DateOfBirth] & "#"

But you must consider the fact that there might be more the one surname that
was born in the same date.
 
Top