K
KateB
I have created a database to record results provided by a local laboratory.
I was told that the Lab number on each report was unique, so decided that
should be the primary key. I have now discovered that I was mis-informed.
At the Lab they actually put the year before the Lab number (meaning these
numbers are 're-used'), but it is hidden on the forms sent to us.
This means I now need to amend the primary key number to reflect the year
the sample was reported (this date is recorded as a separate field) and to
automatically combine the year from the reported date (currently dd/mm/yyyy
format) with the Lab number. What's the best way to do this? I don't trust
the people inputting the data to type the correct year in - I've already had
to add in lots of masks and checks to prevent the errors they've already
made! - so would like to automate it.
Therefore, my basic question is, should I make a new primary key field which
concatenates the lab number (current primary key) and year from the reported
date field, or is there a better way? Will it be easy enough to update the
current records (approx. 1000). Can anyone help with how to do that please
and are there any protocols on format?!
Many thanks
I was told that the Lab number on each report was unique, so decided that
should be the primary key. I have now discovered that I was mis-informed.
At the Lab they actually put the year before the Lab number (meaning these
numbers are 're-used'), but it is hidden on the forms sent to us.
This means I now need to amend the primary key number to reflect the year
the sample was reported (this date is recorded as a separate field) and to
automatically combine the year from the reported date (currently dd/mm/yyyy
format) with the Lab number. What's the best way to do this? I don't trust
the people inputting the data to type the correct year in - I've already had
to add in lots of masks and checks to prevent the errors they've already
made! - so would like to automate it.
Therefore, my basic question is, should I make a new primary key field which
concatenates the lab number (current primary key) and year from the reported
date field, or is there a better way? Will it be easy enough to update the
current records (approx. 1000). Can anyone help with how to do that please
and are there any protocols on format?!
Many thanks