Drug information Storage and Retrieval using MS Access
BP210P Computer Applications in Pharmacy Practical
Create a Database
You can create a database by building your own tables, forms, reports, and other database objects.
In most cases, this usually involves one or both of the following:
- Entering, Pasting, or importing data into the table that is created when you create a new database, and then repeating the process with new tables that you create by using the Table command on the Create tab.
- Importing data from other sources and creating new tables in the process.
Create a Blank Database
- On the Getting Started with Microsoft Office Access page, under New Blank Database, Click Blank Database.
- In the Blank Database pane, type a file Name box. If you do not supply a file name extension, Access adds it for you. To Change the location of the file from the default, click Browse for a location to put your database, browse to the new location, and then click OK.
- Click Create. Access creates the database with an empty table named table-1, and then opens Table 1 in datasheet view. The cursor is placed in the first empty cell in the Add New Field column.
- Begin typing to add data or you can paste data from another source, as described in the section copy data from another source into an Access table
Entering information in Datasheet view is designed to be very similar to working in a Microsoft Office Excel 2007 worksheet. The table structure is created while you enter data – any time you add a new column to the table, a new field is defined. Access automatically sets each field’s data type, based on the data you enter.
If you do not want to enter information in table1 at this time, click close. If you made any changes to the table, Access prompts you to save changes to the table. Click Yes to save your changes, Click No discard them, or Click Cancel to leave the table open.
Retrieve Information Using Simple Select Query
When you want to select specific data from one or more sources, you can use a select query. A select query helps you retrieve only the data you want, and also helps you combine data from several data sources. You can use tables and other select queries as data sources for a select query.
Benefits of using a query
A query lets you:
- View data only from the fields you are interested in viewing. When you open a table, you see all the fields. A query is a handy way to save a selection of fields.
- Combine data from several data sources. A table usually only displays data that it stores. A query lets you pick and choose fields from various sources, and specify how the information should be combined.
- Use expressions as fields. For example, you could use the date function as a field, or you could use the format function with a field to control the way the data from the field is formatted in the query results.
- View records that meet criteria that you specify. When you open a table, you see all the records. A query is a handy way to save a selection of records.
Use the Query Wizard to Create a Select Query
You can use the Query wizard to automatically create a select query. When you use the wizard, you have less control over the details of the query design, but the query is usually created faster than if you did not use the wizard. Moreover, the wizard can catch some simple design mistakes and prompt you to perform a different action.
Before you begin
If you use fields from data sources that are not related to each other, the Query Wizard asks you if you want to create relationships. The wizard opens the Relationships window for you, but you must restart the wizard if you edit any relationships. Therefore, before you run the wizard, consider creating any relationships that your query needs
Use the Query Wizard
Step 1: On the Create tab, in the Queries group, click Query Wizard. Note if you’re using Access 2007,
Click Create ….. other ….. Query Wizard.
Step 2: In the New Query dialog box, click Simple Query Wizard, and then click OK.
Step 3: Next, you add fields. You can add up to 255 fields from as many as 32 tables or queries
For each field, Perform these steps:
- Under Tables/Queries, click the table or query that contains the field.
- Under Available Fields, double-click the field to add it to the Selected Fields list. If you want to add all fields to your query, click the button with the double right arrows(>>).
- When you have added all the fields that you want, click Next
Step 4: If you did not add any number fields, skip ahead to step 9. If you added any number fields, the wizard asks whether you want the query to return details or summary data.
Do one of the following:
- If you want to see individual records, click Detail and then click next. Skip ahead to step 9.
- If you want to see summarized numeric data, such as averages, click Summary
And then click Summary Options
In the Summary Option dialog box, specify which fields you want to summarize, and how you want to summarize the data. Only number fields are listed.
For each number field, choose one of the following functions:
- Sum The query returns the sum of all the values of the field.
- Avg The query returns the average of the values of the field.
- Min The query returns the smallest value of the field.
- Max The query returns the largest value of the field.
Step 6: If you want the query results to include a count of the records in a data source, select the appropriate Count records in data source name check box.
Step 7: Click OK to close the Summary Options dialog box.
Step 8: If you did not add a date/time field to the query, skip ahead to step 9. If you added a date- time field to the query, the Query wizard asks you how you would like to group the date values. For example, Suppose you added a number field(“pincode”) and a date/time field (“DOB”) to your query, and then specified in the summary options dialog box that you want to see the average value of the number field “pincode”. Because you included a date/time field, you could calculate summary values for each unique date/time value, for each day, for each month, for each quarter, or for each year.
Select the time period that you want to use to group the date/time values, and then click Next
Step 9: On the last page of the wizard, give the query a title, specify whether you want to open or modify the query, and then click Finish.
If you choose to open the query, the query displays the selected data in datasheet view. If you choose to modify the query, the query opens in Design view.
BP210P Computer Applications in Pharmacy Practical
- Design a questionnaire using a word processing package to gather information about a particular disease.
- Create an HTML web page to show personal information.
- Retrieve the information of a drug and its adverse effects using online tools
- Creating mailing labels Using Label Wizard, generating labels in MS WORD
- Create a database in MS Access to store the patient information with the required fields Using access
- Design a form in MS Access to view, add, delete and modify the patient record in the database
- Generating report and printing the report from the patient database
- Creating invoice table using MS Access
- Drug information storage and retrieval using MS Access
- Creating and working with queries in MS Access
- Exporting Tables, Queries, Forms and Reports to web pages
- Exporting Tables, Queries, Forms and Reports to XML pages
First Year B Pharm Notes, Syllabus, Books, PDF Subjectwise/Topicwise
Pharma News Today 08 Nov 2022
Pharma News Today 07 Nov 2022
Pharma News Today 06 Nov 2022