P
Patti
I apologize for starting a new thread, but I'm afraid the previous won't be
looked at anymore. Plus it is no longer a table design question.
In reply to my original post to .tabledesign, Nikos wrote: "In order to
prevent double
application entries for an applicant on the same date (or, at least, warn
about it), I would use a bit of code behind the application entry form."
Assuming that the two fields that would determine a dup are "AppDate" &
"SSN", I'm guessing it be something like what I have below, but need help
with how to check the contents of the form controls against existing data in
table. Also, where would I put the code? In the On Lost Focus of SSN?
If Me![AppDate] = ' ** WHAT TO PUT HERE ** Then
If Me![SSN] = ' ' ** WHAT TO PUT HERE **
Cancel = True '
End if
End if
TIA,
Patti
<ORIGINAL QUESTIONS FOLLOWS>
Patti,
An applicant may apply several times, and may take several tests for each
application; along these lines, I would suggest one table for applicants
with the SSN as PK, a different table fro applications with an autonumber PK
and an SSN foreign key (so you can have a one to may relationships between
the two), another table for test results bound to the applications table
through the application number (the PK in the applications table being a
foreign key in the test results table) etc. In order to prevent double
application entries for an applicant on the same date (or, at least, warn
about it), I would use a bit of code behind the application entry form.
HTH,
Nikos
looked at anymore. Plus it is no longer a table design question.
In reply to my original post to .tabledesign, Nikos wrote: "In order to
prevent double
application entries for an applicant on the same date (or, at least, warn
about it), I would use a bit of code behind the application entry form."
Assuming that the two fields that would determine a dup are "AppDate" &
"SSN", I'm guessing it be something like what I have below, but need help
with how to check the contents of the form controls against existing data in
table. Also, where would I put the code? In the On Lost Focus of SSN?
If Me![AppDate] = ' ** WHAT TO PUT HERE ** Then
If Me![SSN] = ' ' ** WHAT TO PUT HERE **
Cancel = True '
End if
End if
TIA,
Patti
<ORIGINAL QUESTIONS FOLLOWS>
Patti,
An applicant may apply several times, and may take several tests for each
application; along these lines, I would suggest one table for applicants
with the SSN as PK, a different table fro applications with an autonumber PK
and an SSN foreign key (so you can have a one to may relationships between
the two), another table for test results bound to the applications table
through the application number (the PK in the applications table being a
foreign key in the test results table) etc. In order to prevent double
application entries for an applicant on the same date (or, at least, warn
about it), I would use a bit of code behind the application entry form.
HTH,
Nikos