Access option multiselection

  • Thread starter Thread starter Mihai Koly
  • Start date Start date
M

Mihai Koly

Hi. As a beginner, I want to be able to ad more options in a field. Ex: one
patient needs one ore more blood tests. I want to be able to input all the
tests needed in a field called "Recommended Analysis". How can be made such
thing? Please help! I use MS Office Access 2003. Many thanks!
 
You don't store multiple values in a single field. Plus you don't put
repeating fields into your table. What you need to do is to read up a bit on
normalization to understand how this all works. But a quick tutorial on it
is like this:

If you have something that has a one-to-many situation (one patient can have
many relatives) or a many-to-many situation (many patients can have many
tests) you would need to use at least one, if not two, extra tables to put
this data in. Typically you would handle the input using a form and subform.
The patient info goes in the main form and the part where the patient can
have many different (or even many of the same) tests into the subform.

The tables would be set up sort of like this:

tblPatient
PatientID - Autonumber (primary key)
PatientNumber - Text or Numeric that is center issued or an id like SSN
PatientFName - Text
PatientLName - Text
more one-to-one details..

tblTests
TestID - Autonumber (Primary Key)
TestDescription - Text

tblPatientTests
PatientTestID - Autonumber (Primary Key)
PatientID - Long Integer (Foreign Key - PK from tblPatients)
TestID - Long Integer (Foreign Key - PK from tblTests)
TestDate - Date/Time
TestValue - Text (text used here to allow for various test values which
could be numeric or textual)

That is a simplified structure, but hopefully it helps get the idea across.

for normalization check out this:
http://www.accessmvp.com/strive4peace/Access_Basics_Crystal_080113_Chapter_03.pdf

--
Bob Larson

Free Tutorials and Samples at http://www.btabdevelopment.com

__________________________________
 
Back
Top