How to list items from table in a text box.

P

pokdbz

I have a table with alot of medications as check boxes as yes and no. What I
want to happen is just display all of the medications which were checked in a
text box on a form. What is the best way to go about this?
 
A

Allen Browne

The best way to go about this would be to redesign the tables and set up the
correct relations.

You need at least these 3 tables:
Medication table: one record for each med:
MedicationID primary key
Medication name of the medication.
...

Patient table: one record for each person:
PatientID primary key
Surname
FirstName
...

PatientMedication table:
PatientID relates to Patient.PatientID
MedicationID relates to Medication.MedicationID.

To interface this, you create a main form bound to the Patient table, with a
subform bound to the PatientMedication table. In the subform is a combo for
selecting as many meds as apply to this person (one per row.) You can use a
combo box for selecting the medication.

You can now get the list of medications by creating a query that combines
the 3 tables.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top