Hi gurus!
I have a problem which I hope can be solved in this forum:
I have a Form (Frm_Patient) based on a table (Tbl_Patient) containing basic data on patients in my clinic (name, address, telephone, patient_ID etc).
I also have a table (Tbl_Journal) containing journal data (date, diagnoses, notes and patient_ID) - one record for every contact.
My Frm_Patient is tabbed. On the first tabsheet I have the basic data, and on the second tabsheet i want the Journal-notes for this particular patient.
My first solution has been af subform on the journal-tabsheet. But because it will look better I would like to do it like this:
In VBA coding be able to retrieve from the Tbl_Journal all journal-data for a given patient_ID and put it in one (big) unbound textbox note by note, like this example:
23/12/2009 Arthrosis
... here comes Journalnote number 1.....
30/12/2009 Arthrosis
... here comes Journalnote number 2.....
etc..
It implies something like this:
1: loop through the Tbl_Journal and retrieve the data for the actual patient_ID.
2: For every record matching the patient_ID retrieve the data and place them in the textbox as ilustrated.
Can somebody gove me a hint (or piece of VBA code) on how to acomplish this?
Thank you in advance (I'm an optimistic guy!)
Lars
I have a problem which I hope can be solved in this forum:
I have a Form (Frm_Patient) based on a table (Tbl_Patient) containing basic data on patients in my clinic (name, address, telephone, patient_ID etc).
I also have a table (Tbl_Journal) containing journal data (date, diagnoses, notes and patient_ID) - one record for every contact.
My Frm_Patient is tabbed. On the first tabsheet I have the basic data, and on the second tabsheet i want the Journal-notes for this particular patient.
My first solution has been af subform on the journal-tabsheet. But because it will look better I would like to do it like this:
In VBA coding be able to retrieve from the Tbl_Journal all journal-data for a given patient_ID and put it in one (big) unbound textbox note by note, like this example:
23/12/2009 Arthrosis
... here comes Journalnote number 1.....
30/12/2009 Arthrosis
... here comes Journalnote number 2.....
etc..
It implies something like this:
1: loop through the Tbl_Journal and retrieve the data for the actual patient_ID.
2: For every record matching the patient_ID retrieve the data and place them in the textbox as ilustrated.
Can somebody gove me a hint (or piece of VBA code) on how to acomplish this?
Thank you in advance (I'm an optimistic guy!)
Lars