-
Access printout question. A new user.
Ok, I am new to Access 2000, or any Access, so I don't know the lingo.
I'll try to explain my question as well as I can :
The user enters information into a record...a medical record, like a name, an address, and some
particulars like what type of medications this person is taking...asprin, amoxcicillan, whatever.
Ok, now I want to print out an instruction sheet for this person with regards to the types of
meds they're taking. This sheet would contain recommended dosage, side effects, drug interactions,
whether to take it with a meal or not. This sheet would contain all this information by looking at
"aspirin" in the peron's database file, and then expand on this information in a printout.
In other words, I type in "aspirin" and in return Access prints out a whole bunch of information
on asprin, which the person will find useful.
Now technically I know I'd have to have a (I'm assuming) seperate database with the keyword "aspirin"
and then all this information somehow stored under it. And again somehow they'd have to be linked or
queried, or mined, or whatevered into order to make it work.
Basically I think I'm asking for the equivilant of a computer-librarian. Where I can ask for information
by word (like "aspirin"), and the librarian will give me all the information available in the database.
So how do I do it? lol.
Thanks. - Eric
-
You are basically correct
An Access database consists of many parts, tables, queries, forms, reports, modules, etc..
tables store your data
queries link tables together and extract requested records from the tables
some special queries can also perform updates and deletes from tables
forms use either tables or queries to display and/or edit the data
reports use either tables or queries to format and print the data
because a query works with tables, when it has completed its work
the data returned will look just like what you would get from a table
a table has records like the rows in a spreadsheet and each record
or row has fields just like the columns in a spread sheet.
So now you need three tables:
table 1: tblPatient
table 2: tblPatientMeds
table 3: tblMeds
table 1: tblPatient
fields:
Patient_id Autonumber Field Size:Long Integer
Patient_Name Text Field Size:30
Address Text Field Size:30
table 2: tblPatientMeds
fields:
PatientMeds_id Autonumber Field Size:Long Integer
Patient_id Number Field Size:Long Integer
Meds_id Number Field Size:Long Integer
table 3: tblMeds
fields:
Meds_id Autonumber Field Size:Long Integer
Med_Name Text Field Size:30
Instructions Memo Field Size: n/a
Now you will need a form to allow you to add and modify the
medications for tblMeds. This table contains all medications and their
names and instructions.
Next: create a form that captures the patient info into tblPatient
this form will also need a subform that allows you to assign which
meds they are taking from tblMeds. The subform updates
tblPatientMeds with the Patient_id and Meds_id. link the subform
by Patient_id and use a combo box control for the Meds_id field.
I would display the subform as a datagrid.
Now create a query that links tblPatient to tblPatientMeds by the
Patient_id field an links tblPatientMeds to tblMeds by the Meds_id
field. Then drag down the Patient_Name field from tblPatient; and
Med_Name as well as Instructions from tblMeds save this query.
Now create a report based on the query you just created. Use the
Report Wizard. save the report.
Ok now you can use the forms to input the data and run the report
when you want to print the Info.
If you add a button to the Patient form; one that opens the report
Then in the query the report uses; add frmPatient!Patient_id
in the criteria box of the Patient_id column and save it.
.
This way when the button is clicked only the records for the currently
displayed patient will be on the report.
Hope this helps!!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks