Show Bid Request
Shape command Help for Access
Bid Request Id: 6535
|
|
|
Posted by: |
infomed (37 ratings)
(Software buyer rating 10)
|
Non-action Ratio: |
Very Good - 14.81%
|
Buyer Security Verifications: |
Good
|
Approved on: |
Dec 15, 2001 2:23:38 PM EDT
|
Bidding Closes: |
Dec 29, 2001 2:24:20 PM EDT
|
Viewed (by coders): |
687 times
|
|
|
|
Description:
I need help with a shape command that I'll use in dataenvironment for vb6 connected to Access 2000 db. I'm trying to build a recordset from a few seperate tables. The primary table is Demographics with the patientID as the key. I want to select * from Demographics where patientID = 123. Then, I want to select all medications that patient 123 is taking from Medication table (select * from Medications where patientID = 123). Then I want to select all diagnoses that patient 123 has (select * from Diagnoses where patientID = 123). Finally, I want to print a data report using the combined shaped and appended recordset where I can print out patient 123 demographics, and then a column of diagnoses and another column with medications. I have found using joins don't work because unless the number of meds and diagnoses are the same, you'll get repeated diagnoses or meds - I suspect I need a shape statement. Thanks for your help!
Deliverables: Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
Remember that contacting the other party outside of the site (by email, phone, etc.) on all business projects < $500 (before the buyer's money is escrowed) is a violation of both the software buyer and seller agreements.
We monitor all site activity for such violations and can instantly expel transgressers on the spot, so we thank you in advance for your cooperation.
If you notice a violation please help out the site and report it. Thanks for your help.
|
|
Bidding/Comments:
|
All monetary amounts on the site are in United States dollars.
Rent a Coder is a closed auction, so coders can only see their own bids and comments. Buyers can view every posting made on their bid requests. |
See all rejected bids (and all comments)
Name |
Bid Amount |
Date |
Coder Rating |
|
|
|
|
N/A
|
Dec 16, 2001 5:16:31 PM EDT
|
10
(Excellent)
|
|
|
If the Diagnoses and Medication table can have several records for a specific patient, then using a join to get one recordset may not be the best approach. If ultimately you are looking just to create a report to show all this detail for a specific patient sorted by section (Demographics/Diagnoses/Medication) then I can create it for you and send you the code. Just reply back.
Thanks, Mario |
|
|
|
This bid was accepted by the buyer!
|
$50 (USD)
|
Dec 19, 2001 9:49:56 AM EDT
|
10
(Excellent)
|
|
|
Hi, I had trouble opening your Access database so I created one based on your description. I created a DEMOGRAPHICS table, DIAGNOSES table and MEDICATIONS table. I have added two patients, one with two DIAGNOSES the other with one DIAGNOSES. MEDICATIONS have been administered for each DIAGNOSES. You can select the patient to report on in the form and press show report. You will see for the patient with the two diagnoses, only the two diagnoses are listed with their respective medications.
I hope this helps. If you need anymore help, just let me know.
I would appreciate if you approve my bid since working for free is prohibited.
Thanks, Mario |
|
Attached File
|
|
|
|
N/A
|
Dec 19, 2001 9:54:39 AM EDT
|
10
(Excellent)
|
|
|
P.S. The access database was created in Access '97 so you may need to convert it Access 2000. Access 2000 does this automatically for you when you attempt to open the mdb file.
Thanks again, Mario |
|
|
|
|
N/A
|
Dec 19, 2001 9:02:47 PM EDT
|
10
(Excellent)
|
|
|
Hi Jon,
Sorry for the delay. I had to redo the database and program at home since I left the code at work. I duplicated the database almost exactly like the previous one as best as I can remember, but the small differences are irrelevant anyway. Same setup-3 tables;DEMOGRAPHICS, DIAGNOSES; MEDICATIONS.
The query you need is a union query which is what I have used in the new attachment. You can see this in the cmdShowReport_Click event.
I have Archie and Edith as patients but I have different number of Diagnoses vs Medications for each patient. Archie has 3 diagnoses and only 1 medication.
The report shows all this now and is what I believe what you re looking for. But may I make a suggestion --the VB data reports/designer are not great. They only support one hierarchy of data making data reports very simple and rather boring. Invest in Crystal reports where it supports multi-hierachy. Reports look very professional and blows away the VB data reports.
Let me know if this is OK.
Thanks, Mario |
|
Attached File
|
|
|
|
N/A
|
Dec 21, 2001 6:33:31 PM EDT
|
10
(Excellent)
|
|
|
Hi Jon,
Did you receive my last VB attachment? If so, did you have any questions? If you need me to resend it to you then let me know.
Thanks, Mario
|
|
|
|
|
|