You are on page 1of 40

1

DEGREE COLLEGE HENNUR CROSS,KALYAN NAGAR,BANGALORE-560043

PHARMACY

PROJECT RESUME
Title Developed By :-AUTOMATION OF PHARMACY :- M.VIJAY KUMAR MADHU SHREE .D.V 09KSS75032 09KSS75053

JACKSON RUBEN PEREIRA.J 09KSS75023 Qualification Developed At Project Guide Software Tools :-B.Sc. IVth Semester :-Indian Academy Degree College :-Dileep Mohan sir :-Microsoft Visual Studio 6.0 Enterprise Edition

Microsoft Windows Operating System

DEGREE COLLEGE HENNUR CROSS,KALYAN NAGAR,BANGALORE-560043

DEPARTMENT OF COMPUTER SCIENCE Certificate


This is to certify that MADHU SHREE REG.NO 09KSS75053 of 4thsemB.Sc has satisfactorily completed the project report on PHARMACY as partial fulfilment of the requirements for the award of the degree in Bachelor of SCIENCE Bangalore University during the academic year 2011.

Project Guide.

Head of the Department

DEGREE COLLEGE HENNUR CROSS,KALYAN NAGAR,BANGALORE-560043

DEPARTMENT OF COMPUTER SCIENCE Certificate


This is to certify that M.VIJAY KUMAR REG.NO 09KSS75032 of 4thsemB.Sc has satisfactorily completed the project report on PHARMACY as partial fulfilment of the requirements for the award of the degree in Bachelor of SCIENCE Bangalore University during the academic year 2011.

Project Guide.

Head of the Department

ACKNOWLEDGEMENT
The successful completion of this project work was made possible with the help and guidance received by me from various quarters. I would like to avail opportunity to express my sincere thanks and gratitude to all of them. I am thankful to our Sir Mr .Dileep Mohan, for his support in completing the project .His outstanding zeal has always inspired me. I would like to express my profound gratitude toMrs.Anuradha, Head Of the Department, Computer Science for her support and guidance. I am Sincerely Grateful to my internal guideMr. Dileep Mohan, Lecturer, Department of Computer Science, for his keen interest and encouragement in our project work whose co-operation and guidance helped me in nurturing the project to reality. I am grateful to all the staff members(both teaching and non-teaching) of the Department of Computer Science for their support. Finally I wish to thank my Parents and friends for their co-operation and constant encouragement.

M.VIJAY KUMAR

ACKNOWLEDGEMENT
The successful completion of this project work was made possible with the help and guidance received by me from various quarters. I would like to avail opportunity to express my sincere thanks and gratitude to all of them. I am thankful to our Sir Mr .Dileep Mohan, for his support in completing the project .His outstanding zeal has always inspired me. I would like to express my profound gratitude to Mrs.Anuradha, Head Of the Department, Computer Science for her support and guidance. I am Sincerely Grateful to my internal guide Mr. Dileep Mohan, Lecturer, Department of Computer Science, for his keen interest and encouragement in our project work whose co-operation and guidance helped me in nurturing the project to reality. I am grateful to all the staff members(both teaching and nonteaching) of the Department of Computer Science for their support. Finally I wish to thank my Parents and friends for their co-operation and constant encouragement.

MADHU SHREE

VISUAL BASIC 6.0


DEFINITION:
Visual Basic is highly interactive programming language. It has several features that allow the programmer to develop the application from MS windows in an easy & efficient manner.

Why visual basic :


The visual basic environment increases the productivity of the programmer by providing the necessary to develop extremely sophisticated applications. Unlike the other windows programming environment like visual C++, Visual Basic programs are very simple & easy to write. Visual Basic follows the standard syntax of basic, expect that same new language features have been added to it to give more flexibility to programmer . visual basic relies very heavily on the windows user interface.

CRYSTAL REPORT:
Crystal report 8.0 is software developed by Seagate. This software is useful for creating reports for any RDBMS Database (MS Access, SQL Server, Oracle etc) . Seagate crystal report current version is designed to support the server based with the version 8.0 the following basic operations can be done to create a new report.

Open an exiting report:


Saves the report. Send the report to the printer. Export the report to a file or an E-mail. Refreshes the report data. Insert a database and a text object. Set the magnification factor for viewing our report.

Introduction to MS Access
Definition:
Microsoft Access is a relational database management system throughout which we can have multiple tables, all linked to each other through a common field, each table containing a specific type of information.

What is DATABASE?
A systematic organisation of data is called as Database. Traditionally fields & records are used to organize database. A record is all the information about one item.

STARTING MICROSOFT ACCESS:


Click the Microsoft Access button from the Microsoft shortcut bar. OR Alternatively choose Microsoft Access command from Microsoft office option from programmer option from start menu.

CREATING A NEW DATABASE:


A well designed database ensures convenient & fast access to the information that we want. If our database designed is not optimised we may not be able to get the result that we from our data & we may frequently need to design our database.

DEFINE THE PURPOSE:


Our database is considered as present & future questions (queries) we want the answer from the stored data we can find the data easily.

AUTOMATION OF PHARMACY
CONTENTS INTRODUCTION DATA FLOW DIAGRAM SNAP SHOTS OF THE FORMS CODING CONCLUSION BIBLIOGRAPHY

AUTOMATION OF PHARMACY INTRODUCTION


The AUTOMATION OF PHARMACYproject stores STOCK DETAILS of MEDICINE.

The following are the key aspect of the project: Login screen. Proceed further. New details of customer. STOCK DETAILS. Stock details. Complete stock details Pharmacy Billing

The use of database management system means efficient storage of information regarding PHARMACY details. An easy to use form based user interface makes the task of organizing PHARMACY information much more easier and agreeable.

10

AUTOMATION OF PHARMACY

11

LOGIN SCREEN:

12

HOME SCREEN:

13

NEW DETAIL:

14

SALES DETAILS:

15

STOCK DETAILS:

16

COMPLETE STOCK DETAILS:

17

LOGIN SCREEN:
Private Sub Command1_Click() Unload Me End Sub

Private Sub Command2_Click() If Text1.Text = "jackson" And Text2.Text = "franklin" Or Text1.Text = "vijay" And Text2.Text = "8105708785" Or Text1.Text = "madhu" And Text2.Text = "shree" Then Form1.Hide Form2.Show Else MsgBox "Sorry your user name or password is incorrect.Retype it again.", vbOKCancel + vbExclamation, "WARNING" Text1.Text = "" Text2.Text = "" End If End Sub

18

HOME SCREEN
Private Sub Command1_Click() If Option1.Value = True Then Form2.Hide Form3.Show End If If Option2.Value = True Then Form2.Hide Form4.Show End If If Option3.Value = True Then Form2.Hide Form5.Show End If If Option4.Value = True Then Form2.Hide Form6.Show End If End Sub

Private Sub Command2_Click() Unload Me End Sub

Private Sub Form_Load() Option1.Value = False Option2.Value = False Option3.Value = False Option4.Value = False End Sub

Private Sub Timer1_Timer()

19

display.Caption = Time$ Time$ = Format$(Now, "hh:mm:ss") End Sub

Private Sub Timer2_Timer() display1.Caption = Date$ Date$ = Format(Now, "m/d/yyyy") End Sub

20

NEW DETAIL:
Dim rs As New ADODB.Recordset Dim cn As New ADODB.Connection

Private Sub Command11_Click() Adodc1.Recordset.Delete Adodc1.Recordset.MovePrevious End Sub

Private Sub Command12_Click() Text11.Text = Val(Text7.Text) * Val(Text4.Text) Text10.Text = Val(Text10.Text) + Val(Text11.Text) Dim qty As Integer qty = Val(Text5.Text) - Val(Text7.Text) If qty < 0 Then MsgBox "Shortage of stock.Order for stock.", vbInformation + vbOKOnly, "Stock Information" Exit Sub Else Text5.Text = "" Text5.Text = qty End If If qty < 10 Then MsgBox "Stock is getting less.Order for stock", vbInformation + vbOKOnly, "Stock Information" End If Data1.UpdateRecord Data1.Recordset.Bookmark = Data1.Recordset.LastModified DataGrid1.Visible = True Adodc1.Recordset!MEDICINE_NAME = Text8.Text Adodc1.Recordset!QUANTITY = Text7.Text Adodc1.Recordset!Rate = Text4.Text Adodc1.Recordset!Name = Text1.Text Adodc1.Recordset!SICKNESS_DISEASE = Text9.Text

21

Adodc1.Recordset!DOCTORS_NAME = Text3.Text Adodc1.Recordset.AddNew rs.AddNew rs.Update Text1.Text = Text12.Text Text9.Text = Text13.Text Text3.Text = Text14.Text Text4.Text = "" Text7.Text = "" End Sub

Private Sub Command14_Click() Form7.DataGrid1.Refresh Form7.Refresh Form3.Hide Form7.Show End Sub

Private Sub Command15_Click() Label5.Caption = Text10.Text Data1.UpdateRecord Data1.Recordset.Bookmark = Data1.Recordset.LastModified End Sub

Private Sub Command2_Click() Form3.Hide Form2.Show End Sub

Private Sub Command3_Click() Form3.Hide Form4.Show

22

End Sub

Private Sub Command4_Click() Form3.Hide Form5.Show End Sub

Private Sub Command5_Click() On Error GoTo ErrSearch Dim Med As String Loc rs.MoveFirst 'refresh recordset Med = InputBox("enter the medicine name required?", "search by Medicine_Names") rs.Find "Medicine_Names='" + Med + "'" If rs.RecordCount = 0 Or rs.EOF Then MsgBox "medicine not found" Exit Sub Else Fillfields End If Exit Sub ErrSearch: MsgBox Err.Description End Sub

Private Sub Command5_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) Text8.Text = Text2.Text Text4.Text = Text6.Text End Sub

Private Sub Command6_Click() Unload Me

23

End Sub

Private Sub Form_Load() cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Visual Basic\Pharmacy Project\Stock Details\Stock Details.mdb;Persist Security Info=False" rs.Open "select * from Stock", cn, adOpenDynamic, adLockOptimistic Text1.Text = "" Text3.Text = "" Text4.Text = "" Text7.Text = "" Text8.Text = "" Text9.Text = "" End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then Exit Sub Else MsgBox "Enter only NAME", vbOKOnly + vbExclamation KeyAscii = 0 End If End Sub

Private Sub Text1_LostFocus() Text12.Text = Text1.Text End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then Exit Sub Else MsgBox "Enter only ALPHABETS", vbOKOnly + vbExclamation

24

KeyAscii = 0 End If End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then Exit Sub Else MsgBox "Enter only NAME", vbOKOnly + vbExclamation KeyAscii = 0 End If End Sub

Private Sub Text3_LostFocus() Text14.Text = Text3.Text End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then MsgBox "Enter only NUMBERS", vbOKOnly + vbExclamation KeyAscii = 0 Exit Sub Else End If End Sub

Private Sub Text7_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then MsgBox "Enter only NUMBERS", vbOKOnly + vbExclamation KeyAscii = 0 Exit Sub Else

25

End If End Sub

Private Sub Text9_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then Exit Sub Else MsgBox "Enter only SICKNESS/DISEASE NAME", vbOKOnly + vbExclamation KeyAscii = 0 End If End Sub

Private Sub Text9_LostFocus() Text13.Text = Text9.Text End Sub

Private Sub Timer1_Timer() display.Caption = Date$ Date$ = Format(Now, "m/d/yyyy") End Sub

Public Sub Fillfields() Text2.Text = rs("Medicine_Names") Text5.Text = rs("Quantity") Text6.Text = rs("Cost") End Sub

Public Sub Loc() Text5.Enabled = False Text6.Enabled = False End Sub

26

SALES DETAILS:
Private Sub Calendar1_Click() Text1.Text = Calendar1.Value End Sub

Private Sub Command1_Click(Index As Integer) Form4.Hide Form3.Show End Sub

Private Sub Command2_Click() Form4.Hide Form2.Show End Sub

Private Sub Command4_Click() Form4.Hide Form5.Show End Sub

Private Sub Command5_Click() If Option1.Value = True Then Frame2.Visible = False Frame3.Visible = True End If If Option2.Value = True Then Frame3.Visible = False Frame2.Visible = True DataGrid1.Visible = True End If End Sub

27

Private Sub Command7_Click() Unload Me End Sub

Private Sub Form_Load() DataGrid1.Refresh End Sub

Private Sub Option1_Click() If Option1.Value = True Then Command5.Enabled = True End If End Sub

Private Sub Option2_Click() If Option2.Value = True Then Command5.Enabled = True End If End Sub

28

STOCK DETAILS:
Dim rs As New ADODB.Recordset Dim cn As New ADODB.Connection

Private Sub Command1_Click(Index As Integer) Form5.Hide Form3.Show End Sub

Private Sub Command10_Click() Text7.Visible = False Text8.Visible = False Text9.Visible = False Text10.Visible = False Text11.Visible = False Text12.Visible = False Data1.Recordset.MovePrevious If Data1.Recordset.BOF Then Data1.Recordset.MoveFirst MsgBox ("first record reached!!") End If End Sub

Private Sub Command11_Click() Text7.Visible = True Text8.Visible = True Text9.Visible = True Text10.Visible = True Text11.Visible = True Text12.Visible = True Data1.Recordset.AddNew End Sub

29

Private Sub Command12_Click() Text1.Locked = False Text2.Locked = False Text3.Locked = False Text4.Locked = False Text5.Locked = False Text6.Locked = False End Sub

Private Sub Command13_Click() Data1.UpdateRecord Data1.Recordset.Bookmark = Data1.Recordset.LastModified Dim Del As Integer Del = MsgBox("Do you want to delete this MEDICINE YES/NO ?", vbYesNo + vbQuestion) If Del = vbYes Then Data1.Recordset.Delete Data1.Recordset.MoveNext Else If Data1.Recordset.EOF Then Data1.Recordset.MoveLast End If End If End Sub

Private Sub Command2_Click() Form5.Hide Form6.Show End Sub

Private Sub Command3_Click() Form5.Hide

30

Form4.Show End Sub

Private Sub Command5_Click() Text7.Visible = False Text8.Visible = False Text9.Visible = False Text10.Visible = False Text11.Visible = False Text12.Visible = False Data1.Recordset.MoveNext If Data1.Recordset.EOF Then Data1.Recordset.MoveLast MsgBox ("last record reached!!") End If End Sub

Private Sub Command6_Click() Form6.Adodc1.Recordset!Batch_No = Form5.Text1.Text Form6.Adodc1.Recordset!MEDICINE_NAMES = Form5.Text2.Text Form6.Adodc1.Recordset!Mfg_Date = Form5.Text3.Text Form6.Adodc1.Recordset!Exp_Date = Form5.Text4.Text Form6.Adodc1.Recordset!Cost = Form5.Text5.Text Form6.Adodc1.Recordset!QUANTITY = Form5.Text6.Text Text7.Visible = False Text8.Visible = False Text9.Visible = False Text10.Visible = False Text11.Visible = False Text12.Visible = False Form6.DataGrid1.Refresh On Error GoTo ErrMsg

31

Data1.UpdateRecord Data1.Recordset.Bookmark = Data1.Recordset.LastModified MsgBox "data saved" Exit Sub ErrMsg: MsgBox "please close the window and open again", vbCritical, "Warning" Text1.Locked = True Text2.Locked = True Text3.Locked = True Text4.Locked = True Text5.Locked = True Text6.Locked = True End Sub

Private Sub Command7_Click() Dim rs1 As New ADODB.Recordset Dim sql As String Dim sBatch_No As String Dim sMedicine_Names As String Dim sMfg_Date As String Dim sExp_Date As String Dim sCost As String Dim sQuantity As String sMedicine_Names = InputBox("Enter the Medicine Name") sql = "select* from Stock where Medicine_Names = '" & sMedicine_Names & "' " rs1.Open sql, cn, adOpenDynamic, adLockOptimistic If rs1.EOF Then MsgBox ("Stock not available") Else Text1.Text = rs1!Batch_No Text2.Text = rs1!MEDICINE_NAMES Text3.Text = rs1!Mfg_Date Text4.Text = rs1!Exp_Date

32

Text5.Text = rs1!Cost Text6.Text = rs1!QUANTITY End If End Sub

Private Sub Command8_Click() Unload Me End Sub

Private Sub Command9_Click() Form5.Hide Form2.Show End Sub

Private Sub Form_Load() cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Visual Basic\Pharmacy Project\Stock Details\Stock Details.mdb;Persist Security Info=False" rs.Open "select * from Stock ", cn, adOpenDynamic, adLockOptimistic Timer1.Enabled = True End Sub

Public Sub Assign() Text1.Text = rs!Batch_No Text2.Text = rs!MEDICINE_NAMES Text3.Text = rs!Mfg_Date Text4.Text = rs!Exp_Date Text5.Text = rs!Cost Text6.Text = rs!QUANTITY End Sub

Private Sub Text10_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then

33

MsgBox "Enter only the DATE", vbOKOnly + vbExclamation KeyAscii = 0 Exit Sub Else End If End Sub

Private Sub Text4_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then MsgBox "Enter only the DATE", vbOKOnly + vbExclamation KeyAscii = 0 Exit Sub Else End If End Sub

Private Sub Text11_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then MsgBox "Enter only the COST", vbOKOnly + vbExclamation KeyAscii = 0 Exit Sub Else End If End Sub

Private Sub Text12_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then MsgBox "Enter only the QUANTITY", vbOKOnly + vbExclamation KeyAscii = 0 Exit Sub Else End If

34

End Sub

Private Sub Text5_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then MsgBox "Enter only the COST", vbOKOnly + vbExclamation KeyAscii = 0 Exit Sub Else End If End Sub

Private Sub Text6_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then MsgBox "Enter only the QUANTITY", vbOKOnly + vbExclamation KeyAscii = 0 Exit Sub Else End If End Sub

Private Sub Text3_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then MsgBox "Enter only the DATE", vbOKOnly + vbExclamation KeyAscii = 0 Exit Sub Else End If End Sub

Private Sub Text9_KeyPress(KeyAscii As Integer) If (KeyAscii >= 65 And KeyAscii <= 90) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 32 Or KeyAscii = 8 Then MsgBox "Enter only the DATE", vbOKOnly + vbExclamation

35

KeyAscii = 0 Exit Sub Else End If End Sub

Private Sub Timer1_Timer() If Label1.Left = 12360 Then Label1.Left = -9000 Else Label1.Left = Label1.Left + 40 End If End Sub

36

COMPLETE STOCK DETAILS:

Dim rs As New ADODB.Recordset Dim cn As New ADODB.Connection

Private Sub Command1_Click() Form6.Hide Form2.Show End Sub

Private Sub Command2_Click() Form6.Hide Form5.Show End Sub

Private Sub Command3_Click() Unload Me End Sub

Private Sub Form_Load() Form6.Refresh DataGrid1.Refresh cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Visual Basic\Pharmacy Project\Stock Details\Stock Details.mdb;Persist Security Info=False" rs.Open "select * from Stock", cn, adOpenDynamic, adLockOptimistic End Sub

Private Sub Timer1_Timer() If Label8.Left = 12120 Then Label8.Left = -7920 Else

37

Label8.Left = Label8.Left + 40 End If End Sub

38

PHARMACY BILLING:

Dim rs As New ADODB.Recordset Dim cn As New ADODB.Connection

Private Sub Command1_Click() Form7.Hide Form3.Show End Sub

Private Sub Form_Load() Label10.Caption = Form3.Label5.Caption DataGrid1.Refresh Form7.Refresh Label10.Caption = Form3.Label5.Caption cn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Visual Basic\Pharmacy Project\Patient's Details\Patient's Details.mdb;Persist Security Info=False" rs.Open "select * from Patient ", cn, adOpenDynamic, adLockOptimistic End Sub

39

CONCLUSION

This project has come to a success after a battle of war with our minds creativity AUTOMATION OF PHARMACY ready for implementation. Though the application is quite Complicated but it provides a variety of information. some of the good features a user may easily notice while navigation through the project is as follows:

New details of customer. STOCK DETAILS. Stock details. Complete stock details

Considering the time in hand to develop the project and the knowledge of subjects needed to develop an application project, this is the best that can be done.

40

Bibliography EXPERT GUIDE TO VISUAL BASIC6. VISUAK PROGRAMMING.VISUAL BASIC BLACK BOOK.

You might also like