merging records into one memo field

A

AMN

Hi

I have a table named History and table named Medications. The key in
History is EncounterID and there is a memo field in History named MedList.
The key in Medications is MedicationID and there is a one to many
relationship between History and Medications tables as one EncounterID can
have multiple MedicationIDs.

I would like to write a code to query all the MedicationID data related to a
certain EncounterID and addthem to the Medlist memo field in a list format.
Preferable numbered but if that is not possible just as long as they are in a
list one under the other.

Thank you,
 
M

Michael H

Hi,

I wouldn't recommend actually placing the data in the memo field. Doing so
would mean having the same data in two different places in your database,
which is against the rules of proper database normalization. In order to do
something like displaying the Medication data on a form, consider just
placing the data in an unbound TextBox.

To accomplish this, you may want to have a look at the "Generic Function To
Concatenate Child Records" sample DB at Roger's Access Library at
http://www.rogersaccesslibrary.com . Click on "Other Developer Libraries",
and look under Hookom, Duane.

-Michael
 
A

AMN

thank you very much. This was extremely helpful.

Michael H said:
Hi,

I wouldn't recommend actually placing the data in the memo field. Doing so
would mean having the same data in two different places in your database,
which is against the rules of proper database normalization. In order to do
something like displaying the Medication data on a form, consider just
placing the data in an unbound TextBox.

To accomplish this, you may want to have a look at the "Generic Function To
Concatenate Child Records" sample DB at Roger's Access Library at
http://www.rogersaccesslibrary.com . Click on "Other Developer Libraries",
and look under Hookom, Duane.

-Michael
 

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