0% found this document useful (0 votes)
105 views91 pages

Ex No:1 Library Management System Date

The document describes a library management system project created using VB6.0 to automate library processes and reduce manual work. The system allows users to manage student details, book details, book issuing and returning. It includes forms for login, student details, book details, book issue, book return, and reports. The system was tested using various testing methods and connects to a backend Microsoft Access database to store student, book, issue and return records.

Uploaded by

Saravana Kumar R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views91 pages

Ex No:1 Library Management System Date

The document describes a library management system project created using VB6.0 to automate library processes and reduce manual work. The system allows users to manage student details, book details, book issuing and returning. It includes forms for login, student details, book details, book issue, book return, and reports. The system was tested using various testing methods and connects to a backend Microsoft Access database to store student, book, issue and return records.

Uploaded by

Saravana Kumar R
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

EX NO:1 LIBRARY MANAGEMENT SYSTEM

DATE:

PROJECT PLANNING:

This project is entitled as “LIBRARY MANAGEMENT SYSTEM”. It is interactive


software that deals with details of creation of book details and process. This project is done by
using VB6.0. This project is mainly aimed to reduce the manual process. It is user friendly to the
user while at time of using it.

FUNCTION OF THIS SYSTEM:

• Function for Student Details


• Function for Book Details
• Function for Issue Book
• Function for Return Book

DESIGN:

• Login Form
• MDI Form
• Student Details Form
• Book Details Form
• Book Issue Form
• Book Return Form
• Data Report for Issue Form
• Data Report for Return Form

LOGIN FORM:

This module is use to user security for enter into MDI Form.

STUDENT DETAILS FORM:

This module is use to enroll the student information are student id, student name, department,
batch.

BOOK DETAILS FORM:

This module is use to enroll the book information are Book no, Book name, Author name, ISBN
no, Publisher, Copy.

BOOK ISSUE FORM:


This module is use to enter the particular student id and book no for issue the book then the
database store the issue date.

BOOK RETURN FORM:

This module is use to user enters the particular student id and book no for return the book then
the database store the return date.

SOFTWARE REQUIREMENTS:

™ OPERATING SYSTEM: Windows XP/Windows 7.


™ FRONT END : Visual Basic 6.0.
™ BACK END : MS-Access.

USE CASE DIAGRAM:

        Login

View the 
student 

    View the 
book details

        Issue 

STUDENT SYSTEM
     Return
CLASS DIAGRAM:

Book Details
Book No Student Details
Book Name Student ID
Author Name Student Name
ISBN No Department
Publisher Batch
copy Btaken

Issue Return
Book ID Book No
Student ID Student ID
Bname Return Date
Issue_date
Due_date
Renewal Time

Database
Student Details
Book Details
Return
Issue

Issue()
Return()
ACTIVITY DIAGRAM

SOFTWARE TESTING:

¾ WHITE BOX TESTING:


It is a method of testing the internal structure of an application.

¾ BLACK BOX TESTING:


It is a method of testing the functionality of the application.

¾ UNIT TESTING:
Individual unit of the project can be tested, like student, book, issue, return.

¾ INTEGRATION TESTING:
Finally the whole project can be tested then it should perform library processes.
LOGIN FORM:
 
 
Private Sub LOGIN_Click()
If Text1.Text = "vvcet" Or Text1.Text = "VVCET" And Text2.Text = "mca" Or Text2.Text =
"MCA" Then
MDIForm1.Show
Else
MsgBox "INVALID USERNAME AND PASSWORD"
End If
End Sub
Private Sub EXIT_Click()
End
End Sub

MDI FORM DETAILS:

Private Sub STUDENT_Click()


Form2.Show
End Sub
Private Sub BOOK_Click()
Form3.Show
End Sub
Private Sub ISSUE_Click()
Form4.Show
End Sub
Private Sub RETURN_Click()
Form5.Show
End Sub
Private Sub REPORTS1_Click()
DataReport1.Show
End Sub
Private Sub REPORTS2_Click()
DataReport2.Show
End Sub
Private Sub CLOSE_Click()
End
End Sub
STUDENT DETAILS:

Dim Con As New ADODB.Connection


Dim Rs As New ADODB.Recordset
Private Sub Form_Load()
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;data source=D:\sd\lib\Database1.mdb"
Rs.Open "stu", Con, adOpenDynamic, adLockOptimistic
End Sub
Private Sub ADD_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Rs.AddNew
End Sub
Private Sub SAVE_Click()
Rs.Fields(0) = Text1.Text
Rs.Fields(1) = Text2.Text
Rs.Fields(2) = Text3.Text
Rs.Fields(3) = Text4.Text
Rs.Fields(4) = Text5.Text
Rs.Update
MsgBox "Student data is added"
End Sub
Private Sub DELETE_Click()
Rs.DELETE
MsgBox "Student data is deleted"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
End Sub
Private Sub MOVENEXT_Click()
Rs.MOVENEXT
If Rs.EOF = True Then
MsgBox "LAST RECORD IS REACHED"
Rs.MoveFirst
End If
display
End Sub
Public Sub display()
Text1.Text = Rs.Fields(0)
Text2.Text = Rs.Fields(1)
Text3.Text = Rs.Fields(2)
Text4.Text = Rs.Fields(3)
Text5.Text = Rs.Fields(4)
End Sub
Private Sub SEARCH_Click()
Rs.MoveFirst
Dim num As String
num = InputBox("Enter the student id:")
Do While Not Rs.EOF
If Rs.Fields(0) = num Then
MsgBox "Record found"
display
Exit Do
End If
Rs.MOVENEXT
Loop
If Rs.EOF Then
MsgBox "Record not found"
End If
End Sub
Private Sub EXIT_Click()
MDIForm1.Show
End Sub

BOOK DETAILS:
Dim Con As New ADODB.Connection
Dim Rs1 As New ADODB.Recordset
Private Sub Form_Load()
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;data source=D:\sd\lib\Database1.mdb"
Rs1.Open "book", Con, adOpenDynamic, adLockOptimistic
End Sub
Private Sub ADD_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Rs1.AddNew
End Sub
Private Sub SAVE_Click()
Rs1.Fields(0) = Text1.Text
Rs1.Fields(1) = Text2.Text
Rs1.Fields(2) = Text3.Text
Rs1.Fields(3) = Text4.Text
Rs1.Fields(4) = Text5.Text
Rs1.Fields(5) = Val(Text6.Text)
Rs1.Update
MsgBox "Book data is added"
End Sub
Private Sub DELETE_Click()
Rs1.DELETE
MsgBox "Book data is deleted"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub
Private Sub MOVENEXT_Click()
Rs1.MOVENEXT
If Rs1.EOF = True Then
MsgBox "LAST RECORD IS REACHED"
Rs1.MoveFirst
End If
display1
End Sub
Public Sub display1()
Text1.Text = Rs1.Fields(0)
Text2.Text = Rs1.Fields(1)
Text3.Text = Rs1.Fields(2)
Text4.Text = Rs1.Fields(3)
Text5.Text = Rs1.Fields(4)
Text6.Text = Rs1.Fields(5)
End Sub

Private Sub SEARCH_Click()


Rs1.MoveFirst
Dim num As String
num = InputBox("Enter the book number:")
Do While Not Rs1.EOF
If Rs1.Fields(0) = num Then
MsgBox "Record found"
display1
Exit Do
End If
Rs1.MOVENEXT
Loop
If Rs1.EOF Then
MsgBox "Record not found"
End If
End Sub
Private Sub EXIT_Click()
MDIForm1.Show
End Sub

ISSUE DETAILS:

Dim j As Integer
Dim i As Integer
Dim k As Integer
Dim Con As New ADODB.Connection
Dim Rs1 As New ADODB.Recordset
Dim Rs2 As New ADODB.Recordset
Dim Rs3 As New ADODB.Recordset
Dim Rs As New ADODB.Recordset
Private Sub Form_Load()
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;data source=D:\sd\lib\Database1.mdb"
Rs2.Open "issue", Con, adOpenDynamic, adLockOptimistic
Rs1.Open "book", Con, adOpenDynamic, adLockOptimistic
Rs.Open "stu", Con, adOpenDynamic, adLockOptimistic
Rs3.Open "return", Con, adOpenDynamic, adLockOptimistic
End Sub

Private Sub SEARCH_Click()


Rs2.MoveFirst
Dim num As String
num = InputBox("Enter the book nmuber:")
Do While Not Rs2.EOF
If Rs2.Fields(0) = num Then
MsgBox "Record found"
display2
Exit Do
End If
Rs2.MOVENEXT
Loop
If Rs2.EOF Then
MsgBox "Record not found"
End If
End Sub
Private Sub ISSUE_Click()
j=0
Do While Not Rs2.EOF
If Text1.Text = Rs2.Fields(0) Then
j=j+1
MsgBox " This book is already issued"
Exit Do
End If
Rs2.MOVENEXT
Loop
k=0
Rs.MoveFirst
Do While Not Rs.EOF
If Text2.Text = Rs.Fields(0) And Rs.Fields(4) = 4 Then
k=k+1
MsgBox " Already 4 books taken"
Exit Do
End If
Rs.MOVENEXT
Loop
If j = 0 And k = 0 Then
Rs2.AddNew
Rs2.Fields(0) = Text1.Text
Rs2.Fields(1) = Text2.Text
Rs2.Fields(2) = Text3.Text
Rs2.Fields(3) = Text4.Text
Rs2.Fields(4) = Text5.Text
Rs2.Fields(5) = Text6.Text
Rs2.Update
MsgBox "book issued successfully"
Rs.MoveFirst
Do While Not Rs.EOF
If Text2.Text = Rs.Fields(0) Then
Rs.Fields(4) = Rs.Fields(4) + 1
Rs.Update
Exit Do
End If
Rs.MOVENEXT
Loop
End If
Rs2.MoveFirst
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub
Private Sub RENEWAL_Click()
i=0
If Text6.Text = 3 Then
i=i+1
MsgBox " ALREADY 3 TIMES RENEWALED"
End If
If i = 0 Then
Rs2.Fields(0) = Text1.Text
Rs2.Fields(1) = Text2.Text
Rs2.Fields(2) = Text3.Text
Rs2.Fields(3) = Text4.Text
Rs2.Fields(4) = Text5.Text
Rs2.Fields(5) = Rs2.Fields(5) + 1
Rs2.Update
MsgBox " BOOK RENEWALED SUCCESSFULLY"
End If
End Sub

Private Sub NEXT_Click()


Rs2.MOVENEXT
If Rs2.EOF = True Then
MsgBox "LAST RECORD IS REACHED"
Rs2.MoveFirst
End If
display2
End Sub
Public Sub display2()
Text1.Text = Rs2.Fields(0)
Text2.Text = Rs2.Fields(1)
Text3.Text = Rs2.Fields(2)
Text4.Text = Rs2.Fields(3)
Text5.Text = Rs2.Fields(4)
Text6.Text = Rs2.Fields(5)
End Sub
Private Sub CLEAR_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub
Private Sub EXIT_Click()
MDIForm1.Show
End Sub

RETURN DETAILS:

Dim i As Integer
Dim Con As New ADODB.Connection
Dim Rs1 As New ADODB.Recordset
Dim Rs2 As New ADODB.Recordset
Dim Rs As New ADODB.Recordset
Dim Rs3 As New ADODB.Recordset
Private Sub Form_Load()
Con.Open "Provider=Microsoft.Jet.OLEDB.4.0;data source=D:\sd\lib\Database1.mdb"
Rs2.Open "issue", Con, adOpenDynamic, adLockOptimistic
Rs1.Open "book", Con, adOpenDynamic, adLockOptimistic
Rs.Open "stu", Con, adOpenDynamic, adLockOptimistic
Rs3.Open "return", Con, adOpenDynamic, adLockOptimistic
End Sub
Private Sub SEARCH_Click()
Rs2.MoveFirst
Dim num As String
num = InputBox("Enter the book number:")
Do While Not Rs2.EOF
If Rs2.Fields(0) = num Then
Text1.Text = Rs2.Fields(0)
Text2.Text = Rs2.Fields(1)
Text3.Text = Format(Now, "mm-dd-yyyy")
Exit Do
End If
Rs2.MOVENEXT
Loop
If Rs2.EOF Then
MsgBox "Record not found"
End If
End SubPrivate Sub RETURN_Click()
i=0
Do While Not Rs2.EOF
If Text1.Text = Rs2.Fields(0) Then
Rs2.DELETE
Exit Do
End If
Rs2.MOVENEXT
Loop
Rs.MoveFirst
Do While Not Rs.EOF
If Text2.Text = Rs.Fields(0) Then
Rs.Fields(4) = Rs.Fields(4) - 1
Rs.Update
Exit Do
End If
Rs.MOVENEXT
Loop
If i = 0 Then
Rs3.AddNew
Rs3.Fields(0) = Text1.Text
Rs3.Fields(1) = Text2.Text
Rs3.Fields(2) = Text3.Text
Rs3.Update
MsgBox "book returned successfully"
End If
Rs2.MoveFirst
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End Sub
Private Sub EXIT_Click()
MDIForm1.Show
End Sub

 
 
 
 
OUTPUT
 
 
 

 
 
 
 
 
 

 
 
 
 
MDI FORM:
 

 
 
 
 

 
 
 
 
 
 
 
 
 
 
 

                                    
 
 
 
 
 
 
 
 
 
 

   
 
 
 
 
 
 
 
ISSUE REPORT:
 

 
 
 
 
 
 
 
 
 
 
 
 
RETURN REPORT:
 

 
 
 

CONCLUSION:

Thus the above LIBRARY MANAGEMENT SYSTEM application was successfully


done by using VB6.0. It performs issue, renewal, return processes effectively, so it reduces the
manual process.
EX.NO:2 STUDENT MARK ANALYSING SYSTEM

DATE :

PROJECT PLANNING:

This project is entitled as “STUDENT MARK ANALYSING SYSTEM”. It is iterative


software that deals with details of creation of mark details and process. This project is done by
using VISUAL BASIC 6.0. this project is mainly aimed to reduce the manual process. It is user
friendly to the user while at time of using it.

FUNCTION OF THIS SYSTEM:

¾ Function for STUDENT DETAILS.


¾ Function for INTRENALS DETAILS.
¾ Function for SEMESTER DETAILS.

DESIGN:

¾ Login Form.
¾ Student Information.
¾ Internal-1 Details.
¾ Internal-2 Details.
¾ Semester Details.
¾ Data Report For Internals Form.
¾ Data Report For Semester From.

LOGIN FORM:

This module is used for user security.

STUDENT DETAIL FORM:

This module is use to enroll the student informations are student Register Number, Name,
Branch, Year, Address, Phone Number, DOB.
INTERNAL-1 MARK DETAILS:

This module is use to enroll the subject marks are Register Number, Name, Middleware
Technologies, Software Project Management, Datamining And Data Warehousing, Mobile
Computing, Compiler Design.

INTERNAL-2 MARK DETAILS:

This module is use to enroll the subject marks are Register Number, Name, Middleware
Technologies, Software Project Management, Datamining And Data Warehousing, Mobile
Computing, Compiler Design.

SEMESTER DETAILS:

This module is use to enroll the subject marks are Register Number, Name, Middleware
Technologies, Software Project Management, Datamining And Data Warehousing, Mobile
Computing, Compiler Design.

SYSTEM SPECIFICATION:

OPERATING SYSTEM:Windows XP/ Window 7.

FRONT END: Visual Basic 6.0.

BACK END: MS Access.

SOFTWARE TESTING:

¾ WHITE BOX TESTING:

It is a method of testing the internal structure of an application.


¾ BLACK BOX TESTING:

It is a method of testing the functionality of the application.


¾ UNIT TESTING:

Individual unit of the project can be tested.


¾ INTEGRATION TESTING:
Finally the whole project can be tested then it should perform student mark analysing system.
USE-CASE DIAGRAM:

LOGIN

STUDENT
STUDET DETAILS
DETAILS

INTERNALS MARKS

STAFF SYSTEM

SEMESTER MARK

CLASS DIAGRAM:

DATABASE
STUDENT DETAILS
INTERNAL-1 DETAILS
INTERNAL-2 DETAILS
SEMESTER DETAILS

CGPA()

INTERNAL-1 DETAILS
STUDENT DETAILS REGISTER NUMBER
REGISTER NUMBER NAME
NAME MIDDLEWARE TECHNOLOGIES
BRANCH SOFTWARE PROJECT MANAGEMENT
YEAR DATA MINING & DATA WAREHOUSING
ADDRESS MOBILE COMPUTING
PHONE NUMBER COMPILER DESIGN
DOB
CGPA()

INTERNAL-2 DETAILS SEMESTER DETAILS


REGISTER NAME REGISTER NUMBER
NAME NAME
MIDDLEWARE TECHNOLOGIES MIDDLEWARE TECHNOLOGIES
SOFTWARE PROJECT MANAGEMENT SOFTWARE PROJECT MANAGEMENT
DATA MINING & DATA WAREHOUSING DATA MINING & DATA WAREHOUSING
MOBILE COMPUTING MOBILE COMPUTING
COMPILER DESIGN COMPILER DESIGN

CGPA() CGPA()
ACTIVITY DIAGRAM

GET USERNAME
AND PASSWORD

VIEW STUDENT
INFORMATION

VIEW INTERNALS
DETAILS

VIEW SEMESTER
DETAILS

/*LOGIN FORM*/
Dim x, y As String
Private Sub Command1_Click()
x = "a"
y = "b"
If Text1.Text = x And Text2.Text = y Then
Form2.Show
Else
MsgBox "Enter correct username & password"
End If
End Sub
/*STUDENT INFORMATION*/
Dim Con As New ADODB.Connection
Dim Rs As New ADODB.Recordset
Private Sub cmdadd_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = " "
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Rs.AddNew
End Sub
Private Sub cmddel_Click()
Rs.CancelUpdate
MsgBox "Record is Deleted"
End Sub
Private Sub cmdfirst_Click()
Rs.MoveFirst
display
End Sub
Private Sub cmdlast_Click()
Rs.MoveLast
display
End Sub
Private Sub cmdnxt_Click()
Rs.MoveNext
If Rs.EOF = True Then
MsgBox "Last Record is Reached"
Rs.MoveFirst
End If
display
End Sub
Private Sub cmdprev_Click()
Rs.MovePrevious
If Rs.BOF = True Then
MsgBox "First Record is Reached"
Rs.MoveLast
End If
display
End Sub
Private Sub cmdsave_Click()
Rs.Fields(0) = Val(Text1.Text)
Rs.Fields(1) = Text2.Text
Rs.Fields(2) = Text3.Text
Rs.Fields(3) = Text4.Text
Rs.Fields(4) = Text5.Text
Rs.Fields(5) = Text6.Text
Rs.Fields(6) = Text7.Text
Rs.Update
MsgBox "Record is saved"
End Sub
Private Sub cmdview_Click()
display
End Sub
Private Sub Form_Load()
Con.Open "Provider = microsoft.Jet.OLEDB.4.0;data source=D:\sd\student\stu.mdb"
Rs.Open "detail", Con, adOpenDynamic, adLockOptimistic
MsgBox "Student details "
End Sub
Public Sub display()
Text1.Text = Rs.Fields(0)
Text2.Text = Rs.Fields(1)
Text3.Text = Rs.Fields(2)
Text4.Text = Rs.Fields(3)
Text5.Text = Rs.Fields(4)
Text6.Text = Rs.Fields(5)
Text7.Text = Rs.Fields(6)
End Sub
Private Sub int1_Click()
Form3.Show
End Sub
Private Sub int2_Click()
Form4.Show
End Sub
Private Sub int3_Click()
Form5.Show
End Sub

/*INTERNAL-1 DETAILS */
Dim Con As New ADODB.Connection
Dim Rs As New ADODB.Recordset
Dim cgpa As Integer
Private Sub add_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = " "
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Rs.AddNew
End Sub
Private Sub cal_Click()
Text8.Text = (3 * Text3.Text + 3 * Text4.Text + 3 * Text5.Text + 3 * Text6.Text + 3 *
Text7.Text) / 15
End Sub
Private Sub Command1_Click()
DataReport1.Show
End Sub
Private Sub Form_Load()
Con.Open "Provider = microsoft.Jet.OLEDB.4.0;data source=D:\sd\student\stu.mdb"
Rs.Open "internal", Con, adOpenDynamic, adLockOptimistic
MsgBox "internal-1 database viewed"
End Sub

Private Sub nxt_Click()


Rs.MoveNext
If Rs.EOF = True Then
MsgBox "Last Record is Reached"
Rs.MoveFirst
End If
display
End Sub
Private Sub save_Click()
Rs.Fields(0) = Val(Text1.Text)
Rs.Fields(1) = Text2.Text
Rs.Fields(2) = Text3.Text
Rs.Fields(3) = Text4.Text
Rs.Fields(4) = Text5.Text
Rs.Fields(5) = Text6.Text
Rs.Fields(6) = Text7.Text
Rs.Fields(7) = Text8.Text
Rs.Update
MsgBox "Record is saved"
End Sub
Private Sub view_Click()
display
End Sub
Public Sub display()
Text1.Text = Rs.Fields(0)
Text2.Text = Rs.Fields(1)
Text3.Text = Rs.Fields(2)
Text4.Text = Rs.Fields(3)
Text5.Text = Rs.Fields(4)
Text6.Text = Rs.Fields(5)
Text7.Text = Rs.Fields(6)
End Sub
/*INTERNAL-2 DETAILS*/
Dim Con As New ADODB.Connection
Dim Rs As New ADODB.Recordset
Private Sub add_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = " "
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Rs.AddNew
End Sub
Private Sub cal_Click()
Text8.Text = (3 * Text3.Text + 3 * Text4.Text + 3 * Text5.Text + 3 * Text6.Text + 3 *
Text7.Text) / 15
End Sub
Private Sub Form_Load()
Con.Open "Provider = microsoft.Jet.OLEDB.4.0;data source=D:\sd\student\stu.mdb"
Rs.Open "internal2", Con, adOpenDynamic, adLockOptimistic
MsgBox " internal-2 database viewed"
End Sub
Private Sub int2_Click()
DataReport2.Show
End Sub
Private Sub nxt_Click()
Rs.MoveNext
If Rs.EOF = True Then
MsgBox "Last Record is Reached"
Rs.MoveFirst
End If
display
End Sub
Private Sub save_Click()
Rs.Fields(0) = Val(Text1.Text)
Rs.Fields(1) = Text2.Text
Rs.Fields(2) = Text3.Text
Rs.Fields(3) = Text4.Text
Rs.Fields(4) = Text5.Text
Rs.Fields (5) = Text6.Text
Rs.Fields(6) = Text7.Text
Rs.Fields(7) = Text8.Text
Rs.Update
MsgBox "Record is saved"
End Sub
Private Sub view_Click()
display
End Sub
Public Sub display()
Text1.Text = Rs.Fields(0)
Text2.Text = Rs.Fields(1)
Text3.Text = Rs.Fields(2)
Text4.Text = Rs.Fields(3)
Text5.Text = Rs.Fields(4)
Text6.Text = Rs.Fields(5)
Text7.Text = Rs.Fields(6)
End Sub

/*SEMESTER DETAILS*/
Dim Con As New ADODB.Connection
Dim Rs As New ADODB.Recordset
Dim cgpa As Long
Private Sub add_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = " "
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Rs.AddNew
End Sub
Private Sub cal_Click()
Text8.Text = (3 * Text3.Text + 3 * Text4.Text + 3 * Text5.Text + 3 * Text6.Text + 3 *
Text7.Text) / 15
End Sub
Private Sub Form_Load()
Con.Open "Provider = microsoft.Jet.OLEDB.4.0;data source=D:\sd\student\stu.mdb"
Rs.Open "sem", Con, adOpenDynamic, adLockOptimistic
MsgBox " semester database viewed"
End Sub
Private Sub sem_Click()
DataReport3.Show
End Sub
Private Sub nxt_Click()
Rs.MoveNext
If Rs.EOF = True Then
MsgBox "Last Record is Reached"
Rs.MoveFirst
End If
display
End Sub
Private Sub save_Click()
Rs.Fields(0) = Val(Text1.Text)
Rs.Fields(1) = Text2.Text
Rs.Fields(2) = Text3.Text
Rs.Fields(3) = Text4.Text
Rs.Fields(4) = Text5.Text
Rs.Fields(5) = Text6.Text
Rs.Fields(6) = Text7.Text
Rs.Fields(7) = Text8.Text
Rs.Update
MsgBox "Record is saved"
End Sub
Public Sub display()
Text1.Text = Rs.Fields(0)
Text2.Text = Rs.Fields(1)
Text3.Text = Rs.Fields(2)
Text4.Text = Rs.Fields(3)
Text5.Text = Rs.Fields(4)
Text6.Text = Rs.Fields(5)
Text7.Text = Rs.Fields(6)
End Sub
Private Sub view_Click()
Display
End Sub
OUTPUT
CONCLUSION:

Thus the above STUDENT MARK ANALYSING SYSTEM application is implemented


successfully by using VB6.0.It performs mark calculation and shows student details and also it
reduces the manual process.
EX NO:3 TEXT EDITOR

DATE:

PROJECT PLANNING:

The project is entitled as “TEXT EDITOR” .It is editorial software that deals with
editing of text in the absence of ms word software in systems. It is user friendly to the user while
at time of using it.

FUNCTIONS OF THE SYSTEM:-

Create a new document


Edit the document by making documents bold, italic, strikethrough, changing font style,
font color, cut, copy, paste.
We can save, saveas, close and open the existing files.

DESIGN:-

Form1
Menus with sub menus place in form with tooltip describing about menu.

GOALS:-

The goal of this software is to make document preparation flexible in the absence of
MSword.
Since the size of the software is much small as to MSword
We can easily take in any flash drives.

SYSTEM REQUIREMENTS:-

Operating system: windows 7.


Front End: visual basic 6.0.
SOFTWARE TESTING:-

White Box Testing


It is a method of testing the internal structure of an application
Black box Testing
It is a method of testing the functionality of an application
Unit testing
Individual unit of the project can be tested like File, Edit, Format, Help
Integration testing
Finally the whole project can be tested then it should perform text editor
process

USE CASE DIAGRAM:

                                                                                        TEXT EDITOR 

                                                                        

                 
SAVE
 

 
                
  FIND 

   

  User    FONT 
 

 
            
HELP
   

 
CLASS DIAGRAM:

      

                            TEXT EDITOR 
                                           

             EDIT 
                 FILE             FORMAT 
FIND () 
OPEN ()  COLOR () 
FIND NEXT () 
SAVE ()  BOLD () 
REPLACE () 
PRINT ()  ITALIC () 

EXIT ()  UNDERLINE () 

TYPE () 

SIZE () 

STRIKETHROUGH () 
Option Explicit

Public pos, str, a

Private Sub Form_Load()

TextEditor.Width = RichTextBox1.Width

TextEditor.Height = RichTextBox1.Height

TextEditor.Caption = "Notepad"

End Sub

Private Sub mnuBold_Click()

RichTextBox1.SelBold = True

End Sub

Private Sub mnucolor_Click()

CommonDialog1.ShowColor

RichTextBox1.SelColor = CommonDialog1.Color

End Sub

Private Sub mnuExit_Click ()

End

End Sud

Private Sub mnuFind_Click ()

str = Input Box("Enter a string")

Pos = RichTextBox1.Find(str)

If pos <> -1 Then

RichTextBox1.SelStart = pos

RichTextBox1.SelLength = Len(str)

RichTextBox1.SetFocus

Else

MsgBox ("String not found")

End If
End Sub

Private Sub mnuFindNext_Click()

Dim i

a = pos + Len(str)

Pos = RichTextBox1.Find(str, a)

If pos <> -1 Then

RichTextBox1.SelStart = pos

RichTextBox1.SelLength = Len (str)

RichTextBox1.SetFocus

Else

MsgBox ("string not found")

End If

End Sub

Private Sub mnuItalic_Click()

RichTextBox1.SelItalic = True

End Sub

Private Sub mnuNew_Click()

RichTextBox1.Text = ""

TextEditor.Caption = "Untitled Notepad1"

End Sub

Private Sub mnuOpen_Click ()

CommonDialog1.DialogTitle = "Open"

CommonDialog1.FileName = "*.*"

CommonDialog1.ShowOpen

RichTextBox1.LoadFile (CommonDialog1.FileName)

End Sub

Private Sub mnuSave_Click ()


CommonDialog1.FileName = "*.txt"

CommonDialog1.ShowSave

RichTextBox1.SaveFile (CommonDialog1.FileName)

TextEditor.Caption = CommonDialog1.FileName

End Sub

Private Sub mnuSaveAs_Click ()

CommonDialog1.FileName = "*.txt"

CommonDialog1.ShowSaveAs

RichTextBox1.SaveFile (CommonDialog1.FileName)

TextEditor.Caption = CommonDialog1.FileName

End Sub

Private Sub mnuSize_Click()

CommonDialog1.ShowFont

RichTextBox1.SelFontSize = CommonDialog1.FontSize

End Sub

Private Sub mnuStrikethrough_Click()

RichTextBox1.SelStrikeThru = True

End Sub

Private Sub mnuType_Click()

CommonDialog1.ShowFont

RichTextBox1.SelFontName = CommonDialog1.FontName

End Sub

Private Sub mnuUnderline_Click ()

RichTextBox1.SelUnderline = True

End Sub
CONCLUSION:

Thus above text editor implemented successfully by using vb6.0. It performs


searching about File, Edit, Format, and Help.
EX.NO:4 DICTIONARY

DATE:

ABSTRACT:

This project is entitled as “DICTIONARY”, it is interactive software that deals with


details of creation of search word and meaning. This project is done by using VB 6.0. This
project is mainly aimed to reduce the manual process. It is user friendly to the user while at time
of using it.

FUNCTION OF THE SYSTEM:

• Searching the meaning.

DESIGN:

• Login form.
• Dictionary Form

LOGIN FORM:

This module is going to use to Login form.

DICTIONARY FORM:

• FIND:

It displays the Word and Meaning.

GOALS:

The goal of this project is to search and find the words using database connection and it
makes a user job easier to find their meaning in an efficient manner. It provides the interactive
user friendly environment by providing error messages to overcome some difficulties in this
project.
SYSTEM SPECIFICATION:

9 OPERATING SYSTEM : Windows Xp/Windows 7.


9 FRONT END : Visual Basic 6.0
9 BACK END : Ms-Access.

USECASE DIAGRAM:

DICTIONARY
MEANING
ACCESS

USER ADMINISTRATOR
CLASS DIAGRAM:

LOGIN

USER
NAME

CONDITION 

DICTIONARY
MOVE FIRST()
MOVE NEXT()
FIND WORD()
FIRST()
LAST()
DICTIONARY CODING

LOGIN FORM:

Private Sub Command1_Click()


If Text1.Text = "dictionary" And Text2.Text = "dict" Then
MsgBox "WELCOME TO DICTIONARY"
Else
MsgBox "PLEASE ENTER THE CORRECT USER NAME AND PASSWORD"
End If
End Sub

Private Sub Command2_Click()


End
End Sub

DICTIONARY FORM:

Dim CON As New ADODB.Connection


Dim RS As New ADODB.Recordset

Private Sub Command1_Click()

Dim NUM As String


NUM = InputBox("ENTER THE SEARCHING WORDS")
RS.MoveFirst
While RS.EOF = False
If RS.Fields(1) = NUM Then
MsgBox "RECORD FOUND"
DISPLAY
Exit Sub
End If
RS.MoveNext
Wend
MsgBox "RECORD NOT FOUND"
End Sub

Private Sub Command3_Click()


RS.MoveNext
If RS.EOF = True Then
MsgBox "REACHED LAST RECORD"
RS.MoveFirst
End If
DISPLAY
End Sub

Private Sub Command4_Click()


RS.MovePrevious
If RS.BOF = True Then
MsgBox "REACHED FIRST RECORD"
RS.MoveFirst
End If
DISPLAY
End Sub

Private Sub Command6_Click()


End
End Sub

Private Sub Command7_Click()


RS.Fields(1) = Text1.Text
RS.Fields(0) = Text2.Text
RS.Save
MsgBox "Word saved"
End Sub

Private Sub Form_Load()


CON.Open "PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA
SOURCE=D:\sd\dict\Database1.mdb"
RS.Open "Sheet1", CON, adOpenDynamic, adLockOptimistic
MsgBox "DATABASE CONNECTED"
DISPLAY
End Sub

Public Sub DISPLAY()


Text1.Text = RS.Fields(1)
Text2.Text = RS.Fields(0)
End Sub

Private Sub Command2_Click()

Text1.Text = ""
Text2.Text = ""
End Sub
OUTPUT:
CONCLUSION:
Thus above Dictionary implemented successfully by using VB6.0. It performs searching
about meanings words and save. It reduced manual process.
EX:NO :5 TELEPHONE DIRECTORY

DATE :

ABSTRACT:

This project entitled as “Telephone Directory” is an interactive software that deals with
details of creation of find the name, telephone number and address. This project is done by using
VB6.0. This project is mainly aimed to reduce the manual process. It is user friendly to the user
while at time of using it.

FUNCTION OF THIS SYSTEM:

™ Function for add a value.


™ Function for search name.
™ Function for fine the number.

DESIGN:

™ Login form
™ Telephone form

LOGIN FORM:

™ It display and get username & Password from the user.

TELEPHONE FORM:

™ This form is going to use to add new customer details.

OPERATION FORM:

™ ADDNEW
It add a new values for user.
™ SEARCH

In this event being, we get inputs from the user and find the name or phone
number using data base4 connection.

™ DELETE
This event delete the current record.
SYSTEM SPECIFICATION:
™ OPERATING SYSTEM : Windows XP/Windows 7.
™ FRONT END : Visual Basic6.0
™ Back End :Ms-Access

SOFTWARE TESTING:

WHITE BOX TESTING

It is a method of testing the internal structure of an application.

BLACK BOX TESTING

It is a method of testing the functionality of an application.

UNIT TESTING
Individual unit of the project can be tested like phone number, address details,
STD/ISD code numbers.
INTEGRATION TESTING
Finally the whole project can be tested then it should perform telephone directory
process.
USECASE DIAGRAM:

 
       LOGIN

TELEPHONE FILE

USER
ADMINISTATOR

ACTIVITY DIAGRAM:

Enter the login 

Search contact list and  
phone numbers 

Get the address and phone 
numbers  

Get the State or country 
details 

Exit 
CLASS DIAGRAM:

TELEPHONE 
DIRECTORY 

ADMIN   

 
USER 
USER NAME 

PASSWORD 

Search
FALSE

COND
ITION

TELEPHONE

 
    TELEPHONE
 
 
PHONENUMBER() 
ADDNEW () 
ADDRESS() 
DELETE () 
STD/ISDCODE 
SEARCH() 
STATE OR COUNTRY 
CANCEL 

MOVEFIRST() 

MOVELAST() 

MOVEPREVIOUS() 
ADMIN FORM:

Private Sub Command1_Click()


Form8.Show
End Sub
Private Sub Command2_Click()
Form2.Show
End Sub

1.ADMIN
LOGIN FORM:
Dim Con As New ADODB.Connection
Dim Rs As New ADODB.Recordset
Private Sub Command1_Click()
Rs.MoveFirst
While Rs.EOF = False
If Rs.Fields(0) = Text1.Text And Rs.Fields(1) = Text2.Text Then
Form9.Show
Exit Sub
End If
Rs.MoveNext
Wend
MsgBox "invalid user"
End Sub
Private Sub Command2_Click()
Form1.Show
End Sub
Private Sub Form_Load()
Con.Open "provider=microsoft.Jet.OLEDB.4.0;data source=D:\sd\phone\kv.mdb"
Rs.Open "Table1", Con, adOpenDynamic, adLockOptimistic
MsgBox "Welcome"
End Sub
MODIFIABLE FORM:
Dim Con As New ADODB.Connection
Dim Rs As New ADODB.Recordset
Private Sub Command1_Click()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
Rs.AddNew
End Sub
Private Sub Command10_Click()
End
End Sub
Private Sub Command2_Click()
Rs.Delete adAffectCurrent
MsgBox "record deleted"
Rs.MoveFirst
display2
End Sub
Private Sub Command3_Click()
Rs.CancelUpdate
MsgBox "cancelled"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
End Sub
Private Sub Command4_Click()
Rs.Fields(0) = Text1.Text
Rs.Fields(1) = Text2.Text
Rs.Fields(2) = Text3.Text
Rs.Fields(3) = Text4.Text
Rs.Fields(4) = Text5.Text
Rs.Fields(5) = Val(Text6.Text)
Rs.Fields(6) = Text7.Text
Rs.Fields(7) = Text8.Text
Rs.Fields(8) = Text9.Text
Rs.Update
MsgBox "saved"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Text7.Text = ""
Text8.Text = ""
Text9.Text = ""
End Sub
Private Sub Command5_Click()
Rs.MoveFirst
display2
End Sub
Private Sub Command6_Click()
Rs.MoveLast
display2
End Sub
Private Sub Command7_Click()
Rs.MovePrevious
If Rs.BOF = True Then
MsgBox "reached first record"
Rs.MoveLast
End If
display2
End Sub
Private Sub Command8_Click()
Rs.MoveNext
If Rs.EOF = True Then
MsgBox "reached last record"
Rs.MoveFirst
End If
display2
End Sub
Private Sub Command9_Click()
Form1.Show
End Sub
Private Sub Form_Load()
Con.Open "provider=microsoft.Jet.OLEDB.4.0;data source=D:\sd\phone\kk.mdb"
Rs.Open "Table1", Con, adOpenDynamic, adLockOptimistic
MsgBox "Welcome"
display2
End Sub
Public Sub display2()
Text1.Text = Rs.Fields(0)
Text2.Text = Rs.Fields(1)
Text3.Text = Rs.Fields(2)
Text4.Text = Rs.Fields(3)
Text5.Text = Rs.Fields(4)
Text6.Text = Rs.Fields(5)
Text7.Text = Rs.Fields(6)
Text8.Text = Rs.Fields(7)
Text9.Text = Rs.Fields(8)
End Sub

2.USER
SEARCH FORM:
Private Sub Command1_Click()
Form4.Show
End Sub
Private Sub Command2_Click()
Form5.Show
End Sub
Private Sub Command3_Click()
Form6.Show
End Sub
Private Sub Command4_Click()
Form7.Show
End Sub
Private Sub Command5_Click()
Form2.Show
End Sub
Private Sub Command6_Click()
End
End Sub
PHONE NUMBER FORM:

Dim Con As New ADODB.Connection


Dim Rs As New ADODB.Recordset
Dim num As Date
Dim i As Integer
Dim c As Integer
Private Sub Command1_Click()
c=0
Rs.MoveFirst
While Rs.EOF = False
If Text1.Text = Rs.Fields(0) Then
c=c+1
End If
Rs.MoveNext
Wend
If c >= 2 Then
num = InputBox("Enter dob")
Rs.MoveFirst
While Rs.EOF = False
If Rs.Fields(1) = num Then
Text2.Text = Rs.Fields(8)
Exit Sub
End If
Rs.MoveNext
Wend
MsgBox "Give a valid dob"
Else
Rs.MoveFirst
While Rs.EOF = False
If Rs.Fields(0) = Text1.Text Then
Text2.Text = Rs.Fields(8)
Exit Sub
End If
Rs.MoveNext
Wend
MsgBox "Give a valid name"
End If
End Sub
Private Sub Command2_Click()
Form3.Show
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
Con.Open "provider=microsoft.Jet.OLEDB.4.0;data source=D:\sd\phone\kk.mdb"
Rs.Open "Table1", Con, adOpenDynamic, adLockOptimistic
MsgBox "Welcome"
End Sub

ADDRESS FORM:
Dim Con As New ADODB.Connection
Dim Rs As New ADODB.Recordset
Private Sub Command1_Click()
Rs.MoveFirst
While Rs.EOF = False
If Rs.Fields(8) = Text1.Text Then
Text2.Text = Rs.Fields(0)
Text3.Text = Rs.Fields(2)
Text4.Text = Rs.Fields(3)
Text5.Text = Rs.Fields(4)
Text6.Text = Rs.Fields(6)
Text7.Text = Rs.Fields(7)
Text8.Text = Rs.Fields(5)
Exit Sub
End If
Rs.MoveNext
Wend
MsgBox "Give a valid number"
End Sub
Private Sub Command2_Click()
Form3.Show
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
Con.Open "provider=microsoft.Jet.OLEDB.4.0;data source=D:\sd\phone\kk.mdb"
Rs.Open "Table1", Con, adOpenDynamic, adLockOptimistic
MsgBox "Welcome"
End Sub

STD/ISD CODE FORM:

Dim Con As New ADODB.Connection


Dim Rs As New ADODB.Recordset
Private Sub Command1_Click()
Rs.MoveFirst
While Rs.EOF = False
If Rs.Fields(0) = Text1.Text Then
Text2.Text = Rs.Fields(1)
Exit Sub
ElseIf Rs.Fields(2) = Text1.Text Then
Text2.Text = Rs.Fields(3)
Exit Sub
ElseIf Rs.Fields(4) = Text1.Text Then
Text2.Text = Rs.Fields(5)
Exit Sub
End If
Rs.MoveNext
Wend
MsgBox "Give a valid name"
End Sub
Private Sub Command2_Click()
Form3.Show
End Sub
Private Sub Form_Load()
Con.Open "provider=microsoft.Jet.OLEDB.4.0;data source=D:\sd\phone\kk2.mdb"
Rs.Open "Table1", Con, adOpenDynamic, adLockOptimistic
MsgBox "Welcome"
End Sub

STATE/COUNTRY FORM:

Dim Con As New ADODB.Connection


Dim Rs As New ADODB.Recordset
Private Sub Command1_Click()
Rs.MoveFirst
While Rs.EOF = False
If Rs.Fields(1) = Text1.Text Then
Text2.Text = Rs.Fields(0)
Exit Sub
ElseIf Rs.Fields(3) = Text1.Text Then
Text2.Text = Rs.Fields(2)
Exit Sub
ElseIf Rs.Fields(5) = Text1.Text Then
Text2.Text = Rs.Fields(4)
Exit Sub
End If
Rs.MoveNext
Wend
MsgBox "Give a valid code"
End Sub
Private Sub Command2_Click()
Form3.Show
End Sub
Private Sub Command3_Click()
End
End Sub
Private Sub Form_Load()
Con.Open "provider=microsoft.Jet.OLEDB.4.0;data source=D:\sd\phone\kk2.mdb"
Rs.Open "Table1", Con, adOpenDynamic, adLockOptimistic
Msg Box "Welcome"
End Sub
OUTPUT:

LOGIN FORM:
2.USER
DETAILS FORM:

SEARCH FORM:
PHONE NUMBER FORM:

ADDRESS FORM:
STD/ISD CODE FORM:

DISTRICT/ STATE / COUNTRY FORM:

CONCLUSION:
Thus above telephone directory implemented successfully by using VB6.0. It performs
searching about address, details, phone numbers, district /state/country, std/isd code. It reduced
manual process.
INVENTORY MANAGEMENT SYSTEMS

EX NO: 6

DATE:

ABSTRACT:

The object of this project to easily view the “Inventory system”. Such as product
details, sales details. In this project we are collecting the information about the availability of the
stocks. The purchase details, sales details are maintained in the Ms-Access database such as
purchase and sales. And then reports will be generated for each table.

PROJECT DESCRIPTION:

MODULES

¾ Login form
¾ Main form
¾ Purchase details
¾ Sales details
¾ Purchase report
¾ Sales report

LOGIN FORM:

This form is used to login the project of inventory management system only the person
whose know the password can able made the transaction.

MAIN FORM:

Main form is MDIform that contains the menu in that we have transaction, report and end
as the main menu which the transaction menu contains purchase, sales as submenu. In report
menu purchase report, sales report as the submenu.
PURCHASE DETAILS:

In purchase form we have the details about the product name, product code and purchase
quantity. If we select the product name automatically display the product code in the textbox.
And then number of quantity will be added in the purchase table in database.

SALES DETAILS:

In sales form we have the details about the product name, product code and sales quantity.
If we select the product name automatically display the product code in the textbox. And then
number of quantity will be reduced in the sales table in database.

GOALS:

The goals of the project are to computerize the “Inventory management system” to
simplify the manual work and maintain up-to-date information.

SYSTEM ENVIRONMENT:

HARDWARE CONFIGURATION:

• PROCESSOR:PENTIUM-IV
• HARD DISK CAPACITY:40GB

SOFTWARE CONFIGURTION:

• OPERATING SYSTEM: WINDOWS XP


• FORNT END: VISUAL BASIC 6.0
• BACK END: MS-ACCESS 2007
USECASE DIAGRAM:

  purchase 

     sales 

Stock report 

CUSTOMER VENDOR

CLASS DIAGARM:
CODE:

…………………………………MDI Form……………………………..

Private Sub LOGIN_Click()


frmLogin.Show
End Sub
Private Sub PURC_Click()
Form3.Hide
Form1.Show
End Sub
Private Sub SALES_Click()
Form1.Hide
Form3.Show
End Sub
Private Sub EXIT_Click()
End
End Sub
Private Sub PURCREPORT_Click()
DataReport1.Show
End Sub
Private Sub SALESREPORT_Click()
DataReport2.Show
End Sub
..........................................LOGIN FORM.......................................
Private Sub cmdOK_Click()
If txtPassword = "admin" And txtUserName = "admin" Then
MsgBox "Login Successfully", vbInformation
Me.Hide
MDIForm1.Show
LoginSucceeded = True
Me.Hide
Else
MsgBox "Invalid User name & Password, try again!", , "Login"
txtPassword = ""
txtUserName = ""
Me.Show
txtPassword.SetFocus
End If
End Sub
......................................................PURCHASE FORM............................................
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim rs1 As New ADODB.Recordset
Dim rsa As New ADODB.Recordset
Dim cm As New ADODB.Recordset
Dim ra As New ADODB.Recordset
Dim Num As Integer
Private Sub Combo1_Click()
If Combo1.ListIndex = 1 Then
Addd
Text1.Text = "100"
ElseIf Combo1.ListIndex = 2 Then
Addd
Text1.Text = "101"
ElseIf Combo1.ListIndex = 3 Then
Addd
Text1.Text = "102"
ElseIf Combo1.ListIndex = 4 Then
Addd
Text1.Text = "103"
ElseIf Combo1.ListIndex = 5 Then
Addd
Text1.Text = "104"
Else
Text1.Text = "SELECT ITEM"
Text3.Text = ""
Text4.Text = ""
End If
End Sub
Private Sub Command1_Click()
Combo1.SetFocus
Combo1.Locked = False
Label5.Visible = False
Text2.Visible = False
Label4.Caption = "AMOUNT"
Command1.Enabled = False
Command2.Enabled = True
Command4.Enabled = False
Command3.Enabled = False
Command5.Enabled = False
Text1.Text = ""
Text3.Text = ""
Text4.Text = ""
Combo1.ListIndex = 0
End Sub
Private Sub Command2_Click()
If Combo1.ListIndex = 0 Then
MsgBox "Select the Product..", vbInformation, "PRODUCT"
Combo1.SetFocus
Exit Sub
ElseIf Text3.Text = "" Then
MsgBox "Enter the Quantities..", vbInformation, "QUANTITY"
Text3.SetFocus
Exit Sub
End If
cm.Open "select * from purchase where pro_code='" & Text1.Text & "'", con, adOpenStatic,
adLockOptimistic
If cm.RecordCount <> 0 Then
MsgBox "Already purchased", vbInformation
Command4.Enabled = True
cm.Close
Exit Sub
End If
cm.Close
cm.Open "select * from purchase", con, adOpenStatic, adLockOptimistic
With cm
.AddNew
.Fields(0) = Text1.Text
.Fields(1) = Combo1.Text
.Fields(2) = Text3.Text
.Fields(3) = Text4.Text
.Fields(4) = Date
.Fields(5) = Time
.Update
End With
MsgBox "Product Successfully Added", vbInformation, "NEW PRODUCT"
Back
Text1.Text = ""
Text3.Text = ""
Text4.Text = ""
cm.Close
Exit Sub
End Sub
Private Sub Command3_Click()
Command3.Enabled = False
Text2.Visible = True
Label5.Visible = True
Command1.Enabled = False
Command2.Enabled = False
Command4.Enabled = True
Command5.Enabled = True
Label4.Caption = "PURCHASED DATE"
Label5.Caption = "PURCHASED TIME"
Number = InputBox("Enter Account Number", Search, 100)
ra.Open "select * from purchase WHERE PRO_CODE='" & Number & "'", con, adOpenStatic,
adLockOptimistic
If ra.RecordCount = 0 Then
MsgBox "No Record Found", vbInformatio, "SEARCH"
Command4.Enabled = False
Command5.Enabled = False
Command1.Enabled = True
Combo1.ListIndex = 0
Text1.Text = ""
Text3.Text = ""
Text4.Text = ""
Text2.Text = ""
ra.Close
Exit Sub
End If
With ra
Text1.Text = .Fields(0)
Combo1.Text = .Fields(1)
Text3.Text = .Fields(2)
Text4.Text = .Fields(4)
Text2.Text = .Fields(5)
End With
ra.Close
End Sub
Private Sub Command4_Click()
Command4.Enabled = False
rs.Open "select * from purchase", con, adOpenStatic, adLockOptimistic
With rs
.Fields(0) = Text1.Text
.Fields(1) = Combo1.Text
.Fields(2) = Text3.Text
If Combo1.ListIndex = 1 Then
.Fields(3) = Val(.Fields(2)) * Val(250)
.Update
MsgBox "Product Successfully Updated", vbCritical, "UPDATE"
Back
Exit Sub
ElseIf Combo1.ListIndex = 2 Then
.Fields(3) = Val(.Fields(2)) * Val(250)
.Update
MsgBox "Product Successfully Updated", vbCritical, "UPDATE"
Back
Exit Sub
ElseIf Combo1.ListIndex = 3 Then
.Fields(3) = Val(.Fields(2)) * Val(350)
.Update
MsgBox "Product Successfully Updated", vbCritical, "UPDATE"
Back
Exit Sub
Else
.Fields(3) = Val(.Fields(2)) * Val(450)
.Update
MsgBox "Product Successfully Updated", vbCritical, "UPDATE"
Back
Exit Sub
End If
.Fields(4) = Date
.Fields(5) = Time
.Update
End With
Command3.Enabled = True
Command4.Enabled = True
rs.Close
Exit Sub
rs.Close
End Sub
Private Sub Command5_Click()
ra.Open "purchase", con, adOpenStatic, adLockOptimistic
ra.Delete
MsgBox "Product deleted", vbInformation
Command5.Enabled = False
Command4.Enabled = False
Combo1.ListIndex = 0
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
ra.Close
Exit Sub
ra.Close
End Sub
Private Sub Command7_Click()
Me.Hide
MDIForm1.Show
End Sub
Private Sub Command8_Click()
Back
End Sub
Private Sub Form_Load()
Back
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\sd\invy\INVEN.mdb;Persist
Security Info=False"
End Sub
Private Sub Text3_Change()
Addd
End Sub
Public Function Addd()
If Text1.Text = "100" Then
Text4.Text = Val(Text3.Text) * 150
ElseIf Text1.Text = "101" Then
Text4.Text = Val(Text3.Text) * 250
ElseIf Text1.Text = "102" Then
Text4.Text = Val(Text3.Text) * 350
ElseIf Text1.Text = "103" Then
Text4.Text = Val(Text3.Text) * 450
ElseIf Text1.Text = "104" Then
Text4.Text = Val(Text3.Text) * 550
End If
End Function
Public Function Back()
Combo1.Locked = True
Label4.Caption = "AMOUNT"
Text1.Text = ""
Text3.Text = ""
Text4.Text = ""
Combo1.ListIndex = 0
Label5.Visible = False
Text2.Visible = False
Command1.Enabled = True
Command3.Enabled = True
Command2.Enabled = False
Command4.Enabled = False
Command5.Enabled = False
End Function
Private Sub Text3_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case vbKey0 To vbKey9
Case vbKeyBack, vbKeyClear, vbKeyDelete
Case vbKeyLeft, vbKeyRight, vbKeyUp, vbKeyDown, vbKeyTab
Case Else
KeyAscii = 0
Beep
MsgBox "Sorry..! Enter Quantities Only Here..", vbInformation, "QUANTITY"
End Select
End Sub
Private Sub Timer1_Timer()
Label6.ForeColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
End Sub
.......................................................SALES FORM..............................................................
Dim con As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim rs1 As New ADODB.Recordset
Dim rss As New ADODB.Recordset
Dim r As New ADODB.Recordset
Dim vc As New ADODB.Recordset
Private Sub Combo1_Click()
If Combo1.ListIndex = 1 Then
Text1.Text = "100"
ElseIf Combo1.ListIndex = 2 Then
Text1.Text = "101"
ElseIf Combo1.ListIndex = 3 Then
Text1.Text = "102"
ElseIf Combo1.ListIndex = 4 Then
Text1.Text = "103"
ElseIf Combo1.ListIndex = 5 Then
Text1.Text = "104"
Else
Text1.Text = "SELECT ITEM"
End If
End Sub
Private Sub Command1_Click()
Me.Hide
MDIForm1.Show
End Sub

Private Sub Command2_Click()


If Combo1.ListIndex = 0 Then
MsgBox "Select Product Name", vbInformation, "PRODUCT NAME"
Combo1.SetFocus
Exit Sub
ElseIf Text2.Text = "" Then
MsgBox "Enter the Quantities", vbInformation, "QUANTITY"
Text2.SetFocus
Exit Sub
End If
rss.Open "select * from sales where PRO_CODE='" & Text1.Text & "'", con, adOpenStatic,
adLockOptimistic
Dim a As Double
a = Val(rss.Fields(2)) - Val(Text2.Text)
If a <= 0 Then
MsgBox "Insufficient Quantities...", vbInformation, "QUANTITY"
rss.Close
Exit Sub
End If
rss.Fields(2) = a
If Combo1.ListIndex = 1 Then
rss.Fields(3) = Val(rss.Fields(2)) * Val(250)
rss.Update
rss.Close
ElseIf Combo1.ListIndex = 2 Then
rss.Fields(3) = Val(rss.Fields(2)) * Val(250)
rss.Update
rss.Close
ElseIf Combo1.ListIndex = 3 Then
rss.Fields(3) = Val(rss.Fields(2)) * Val(350)
rss.Update
rss.Close
ElseIf Combo1.ListIndex = 4 Then
rss.Fields(3) = Val(rss.Fields(2)) * Val(450)
rss.Update
rss.Close
Else
rss.Fields(3) = Val(rss.Fields(2)) * Val(550)
rss.Update
rss.Close
End If
rs.Open "select * from sales", con, adOpenStatic, adLockOptimistic
With rs
.AddNew
.Fields(0) = Text1.Text
.Fields(1) = Combo1.Text
.Fields(2) = Text2.Text
.Fields(3) = Text3.Text
.Fields(4) = Date
.Fields(5) = Time
.Update
End With
MsgBox "Product Successfully Salesed", vbCritical, "SALES"
Command2.Enabled = False
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
rs.Close
Exit Sub
End Sub
Private Sub Form_Load()
Command2.Enabled = False
con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=d:\sd\invy\INVEN.mdb;Persist
Security Info=False"
End Sub
Public Function Baln()
If Val(Text3.Text) < Val(Text4.Text) Then
ElseIf Text4.Text = "" Then
MsgBox "Sorry..Insufficient Quantity", vbInformation, "SALES DETAILS"
Else
MsgBox " Sorry.. Insufficient Quantity", vbInformation, "SALES DETAILS"
End If
End Function
Public Function Addd()
If Text1.Text = "100" Then
Text3.Text = Val(Text2.Text) * 350
ElseIf Text1.Text = "101" Then
Text3.Text = Val(Text2.Text) * 450
ElseIf Text1.Text = "102" Then
Text3.Text = Val(Text2.Text) * 550
ElseIf Text1.Text = "103" Then
Text3.Text = Val(Text2.Text) * 650
Else
Text3.Text = Val(Text2.Text) * 500
End If
End Function
Private Sub Text2_Change()
Command2.Enabled = True
Addd
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
Select Case KeyAscii
Case vbKey0 To vbKey9
Case vbKeyBack, vbKeyClear, vbKeyDelete
Case vbKeyLeft, vbKeyRight, vbKeyUp, vbKeyDown, vbKeyTab
Case Else
KeyAscii = 0
Beep
MsgBox "Sorry..! Enter Quantities Only Here..", vbInformation, "QUANTITY"
Text2.SetFocus
End Select
End Sub
Private Sub Timer1_Timer()
Label5.ForeColor = RGB(Rnd * 255, Rnd * 255, Rnd * 255)
End Sub
OUTPUT:
LOGIN FORM:

MAIN FORM:
PURCHASE FORM:

Sales Form:
PURCHASE REPORT:

SALES REPORT:

RESULT:

Thus the above inventory system successfully executed and verified.

You might also like