Tom,
WOW!
Thank you as I worked on it until 5am this morning and got it to work. I am
really impressed with the power of RB2005r4 as the older compiler I used
could no way do what I have done so far with RB.
I tested it with a few names and with some meds added to each name and it
all works perfectly! All the patients names match with the patients meds.
Sweet deal!
The hardest part of the project was the DB but now that is completed the
next this is the Printouts that need to be re-created as this is from the
original program I created in 2002.
Thanks again
Jonathon
----- Original Message -----
From: "Dixon, Tom" <[EMAIL PROTECTED]>
To: "Getting Started" <[email protected]>
Sent: Friday, January 13, 2006 7:35 AM
Subject: RE: saving a Listbox to a DB
Jonathan,
What you are wanting are related tables.
You need another table lets call PatientMeds. In it you need an integer
rowid key field, an integer field called PatientRowid and an integer
field called MedicationsRowid. When you select a medication to display
in the patient's medications ListBox you will add a record to
PatientMeds that stores the rowid of the patient and the rowid of the
med. When you display the patient's meds in the ListBox you will use a
query something like the following:
SELECT MedName, MedDescrption, MedDosage, FROM Medications WHERE
Medicatons.rowid = PatientMeds.MedicationsRowid and
PatientMeds.PatientRowid = Patients.rowid
You will need to use your actual column names and refine the query but
this is how you go about creating relational databases. There is more to
it than this example and I would recommend getting a book on relational
database design so you have a better understanding.
HTH
Tom
Ok, I am working on a project that has a main 'patient'
database. It will hold all the important info of the
patient. But I want to create a listbox that will hold all
the paitent's medications in it?
I have the main DB created using the example RB2005 DB, but I
am now lost as to how to create the listbox DB. I have 2
tables, Pateints and one Medications. Ok, the main BD works
fine as it adds saves and delete the pateints fine.
But I am lost as how to figure out the example of the RB2005
DB to include the Medications table to the already Patients
table, or more to the point as how to connect the two tables
to work as one.
Example:
Patient: Jon Smith created a new patient in the program. I
have used Revision No's so the patient may update their files
with OUT deleting the old data. This is kinda like the
Customers, Orders and Products RB2005 DB Example.
Jon Smith, Rev. No. 1, has 3 meds to add to the listbox. The
adding the meds to the already patient table db from a
listbox has me stumped.
Any help or better yet any examples as how i can do this?
Thanks
Jonathon
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.17/228 - Release Date: 1/12/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.17/228 - Release Date: 1/12/2006
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>