Professional Documents
Culture Documents
com
PROJECT REPORT ON
Library Management System
ACKNOWLEDGEMENT
I take this precious opportunity to express my
gratitude toward LIBRARY MANAGEMENT
SYSTEM to grant is permission for under going the
training project. Without its willingness to permit this
project would not have been succeed.
First of all, I would like to thanks all those people
who helped me directly or indirectly to complete my
project whenever I found my self in problems. Our all
faculties encourages me and due to their kindness and
helpful nature and help I got very much confidence to
complete this project.
I am deeply inherited who devoted his precious
time in giving me the information about the various
aspect and gave support and guidance at every point of
time. I am really thankful to their kind and supportive
nature. His inspiring nature has always made my work
easy.
http://www.chetanasprojects.com
http://www.chetanasprojects.com
PREFACE
The field of computer education has witnessed a
sea change since the discovery of simple calculating
machine by CHARLES BABAGE. The era is
confronting with the speed and mind of computer, i.e.
the speed and intelligence have become vital. At one
end they are competing with each other. Not only these
computers have immensely benefited the mankind in
the field of planning. The wheel of progress is rolling
with much faster speed then it used to be a decade ago;
thank to the revolution ushered in by computer. But all
this havent come as easy as it appears to be rather it
requires planning strategy and a lot of brain storming
before a package is developed or a language is born.
Since the prime task of the computer is to process a
raw data into useful information, we can ignore the
basic step of information collection ret rival and
processing at our risk only. The importance of finding
http://www.chetanasprojects.com
http://www.chetanasprojects.com
ABSTRACT
Maintaining records of application for estates, the
manual system is too complex and cumbersome. Since
time and resources available we have been proposed to
develop an inventory system.
All the outset the application requirements were
studied and analysis and design were carried out. The
development platform and software tool were identified
as Visual Basic 6.0 (As Front-End) and Access (As
Back-End) database. Using visual programming, object
are manipulated directly and also due to the feature of
fast and easy prototyping and GUI building visual basic
6.0 as used.
In the system analysis and design part, data is
processed using query techniques and study of the
existing system.
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
level
three-tiered
-: INTRODUCTION TO ACCESS :Database : What they are? And how they work?
A database is collection of information related to
particular or purpose such as tracking customer orders
or maintaining a music collection. If your database isnt
stored on a computer or only parts of it are, you may be
tracking information from variey of source that you
have to coordinate and organize your self.
Using it, you can manage all our information from
single database file. Within file divide your data using
into separate storage containers called tables; view, add,
and update table data using forms; find and retrieve just
the data you want using queries and analyze or print
data in specific layout using reports.
To find and retrieve just data that meet condition
you specify including data from multiple tables create a
query. A query can also update multiple records at the
same time and perform built-in or custom calculations
on your data. To easily view, enter and change directly
in a table, create a form. When you open a form, it
retrives the data from one or more tables and display it
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
Need for computerized system:The main draw back of the existing system is that
manual work leads time consumption. It affects the all
person of management and also the departments. There
http://www.chetanasprojects.com
http://www.chetanasprojects.com
System
Attributes
Characteristic:
Security:-
http://www.chetanasprojects.com
And
Quality
http://www.chetanasprojects.com
http://www.chetanasprojects.com
Path Test.
Loop Test.
Random Data Test.
OS Compatibility Test.
Hardware Compatibility Test.
Data Test.
The above listed test are carried out at development
site, installation site and during the development
process as per the requirement. The multiple waterfall
modules during the development of the project will
assure minimum risk.
Application Requirement:
User Platform:
PC/Pentium
Operating System:
Windows2000
http://www.chetanasprojects.com
http://www.chetanasprojects.com
Database:
Access
Usr
Pw
Typ
Text (20)
Text (20)
Text (1)
http://www.chetanasprojects.com
DESCRIPTION
User Name
User Password
Type of User
http://www.chetanasprojects.com
FIELD NAME
Code
Title
Author
Publisher
Pur_Dt
Price
Qty
Pur_From
IsudBk
Text (6)
Text (30)
Text (20)
Text (20)
Date/Time
Currency
(Standard)
Number (Long int.)
Text (50)
Number (Long int)
DESCRIPTION
Book/CD Code
Title of Book/Cd
Auther of book(s)
Publisher of Book
Purchase Date
Price of Book/Cd
Book/Cd Quantity
Purchase From
Quantity of issued
Book/cd
TABLE=>2
TABLE=>3
FIELD NAME
Code
Surname
Member
Father
Join_Dt
Address
City
Crs
Text (10)
Text (50)
Text (50)
Text (50)
Date/Time
Memo
Text (20)
Text (10)
http://www.chetanasprojects.com
DESCRIPTION
Member No
Surname
Member Name
Father Name
Join Date
Member Address
City
Course
http://www.chetanasprojects.com
Yer
Text (10)
Cnt_No
Gender
Fee
Text (50)
Text (1)
Currency
(Standard)
Currency
(Standard)
Fine
TABLE=>4
Year of Course(FY,
SY, TY,
SEM1,etc...)
Contect Number
Sex
Membership Fee
Fine on late
submission
FIELD NAME
DATA TYPE
DESCRIPTION
Crs
Yer
Mbr_No
Bk_No
Fine
Text (10)
Text (10)
Text (6)
Text (6)
Currency
(Standard)
Fin_Dt
Date/Time
Course
Year of study
Member Number
Book Number
Fine for late
submission, Datmage
etc...
Date of Fine
http://www.chetanasprojects.com
http://www.chetanasprojects.com
TABLE=>5
FIELD NAME
Mbr_No
Crs
Yer
Bk_No
Isu_Dt
Lst_Dt
Text (6)
Text (10)
Text (10)
Text (6)
Date/Time
Date/Time
DESCRIPTION
Member No
Student Course or Staff
Year of Study
Book No.
Issue Date
Last Submit Date
V.B.
FORM
DESIGN
http://www.chetanasprojects.com
http://www.chetanasprojects.com
&
CODDING
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
End If
KeyAscii = upper(KeyAscii)
End Sub
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
Option Explicit
Dim rs As New ADODB.Recordset
Dim FL As String 'TO STORE FILE NAME
Dim rpt As String
Private Sub CmdBkEntry_Click()
Call MnuBkOpr_Click
End Sub
Private Sub CmdBkRpt_Click()
Dim str As String
str = InputBox("Enter BOOK for Book report and CD for Cd
report", "Report Creation", "BOOK")
If str = "BOOK" Then
Call MnuBkRpt_Click
ElseIf str = "CD" Then
Call MnuCdRpt_Click
Else
MsgBox "Invalid input.", vbCritical, "Report Creation"
End If
End Sub
Private Sub CmdBkSubISu_Click()
Call MnuBkIsuSub_Click
End Sub
Private Sub CmdExit_Click()
End
End Sub
Private Sub CmdIsuDtl_Click()
Call MnuBkIsuDtl_Click
End Sub
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
FrmMember.Show
End Sub
Private Sub MnuMbrRpt_Click()
Pct1.Visible = False
Report = "M" 'M means Member Report
FrmRpt.Show vbModal
End Sub
Private Sub MnuMstrSelection_Click()
Pct1.Visible = True
End Sub
Private Sub MnuUmgAcc_Click()
Pct1.Visible = False
FrmUserMng.Show vbModal
End Sub
Private Sub MnuWinClose_Click()
Do While Forms.Count - 1 > 0
Unload Me.ActiveForm
Loop
End Sub
Private Sub MnuWinCscd_Click()
Arrange vbCascade
End Sub
Private Sub MnuWinHrz_Click()
Arrange vbHorizontal
End Sub
Private Sub MnuWinVrtl_Click()
Arrange vbVertical
End Sub
'===================================================
'GENERATE REPORT FOR BOOK/CD (PROCEDURE)
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
End If
Print #1,
"-------------------------------------------------------------------------------"
Print #1, ""
Print #1, " Date : " & Format(Date, "dd-mm-yyyy")
Print #1, ""
Print #1,
"-------------------------------------------------------------------------------"
Print #1, " CODE TITLE
AUTHOR
PRICE QUANTITY "
Print #1,
"-------------------------------------------------------------------------------"
rs.MoveFirst
Do While Not rs.EOF
Print #1, " " & rs!Code & " " & _
rs!title & Space(31 - Len(rs!title)) & _
rs!Author & Space(22 - Len(rs!Author)) & _
Space(6 - Len(rs!Price)) & rs!Price & _
Space(11 - Len(rs!qty)) & rs!qty
Print #1, ""
rs.MoveNext
Loop
rs.Close
Close #1
MsgBox FL & ".txt created successfully.", vbInformation,
"Member Report"
Shell App.Path & "\Reports\wordpad.exe " & App.Path &
"\Reports\" & FL & ".txt", vbMaximizedFocus
End Sub
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
TxtPwd.Text = ""
TxtConfPwd.Text = ""
CmbUserType.Text = CmbUserType.List(0)
End Sub
Private Sub Form_Unload(Cancel As Integer)
rs_user.Close
End Sub
Private Sub TxtConfPwd_GotFocus()
Call Book.selectTxt(TxtConfPwd)
End Sub
Private Sub TxtConfPwd_KeyPress(KeyAscii As Integer)
If KeyAscii = 39 Or KeyAscii = 34 Or KeyAscii = 32 Then
KeyAscii = 0
End If
KeyAscii = Book.upper(KeyAscii)
End Sub
Private Sub TxtPwd_GotFocus()
Call Book.selectTxt(TxtPwd)
End Sub
Private Sub TxtPwd_KeyPress(KeyAscii As Integer)
If KeyAscii = 39 Or KeyAscii = 34 Or KeyAscii = 32 Then
KeyAscii = 0
End If
KeyAscii = Book.upper(KeyAscii)
End Sub
Private Sub TxtUser_GotFocus()
Call Book.selectTxt(TxtUser)
End Sub
Private Sub TxtUser_KeyPress(KeyAscii As Integer)
If KeyAscii = 39 Or KeyAscii = 34 Or KeyAscii = 32 Then
KeyAscii = 0
End If
http://www.chetanasprojects.com
http://www.chetanasprojects.com
KeyAscii = Book.upper(KeyAscii)
End Sub
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
Exit Sub
End If
If CmbUserType.Text = "ADMIN" Then
typ = "A"
Else
typ = "L"
End If
'WHEN CURRENT USER IS CHANGING ACCOUNT
If (TxtCurUser = userNm) And (userType <> typ) Then
MsgBox "You can not change your account type." & vbCrLf
&_
"Login with another Admin user and then change your
account type.", vbInformation, "User Edition"
Exit Sub
End If
Query = "update Login_Mast set usr='" & TxtNewUser &
"',typ='" & _
typ & "' where usr='" & TxtCurUser & "'"
Else
'WHEN USER IS LIMITED
If userNm <> TxtCurUser Then
MsgBox "Your current name is not correct." & vbCrLf & _
"Enter current name again.", vbCritical, "User Edition"
TxtCurUser.SetFocus
Exit Sub
End If
Query = "update Login_Mast set usr='" & TxtNewUser & "'
where usr='" & userNm & "'"
End If
'CHECK FOR DUPLICATE RECORD
rs_user.MoveFirst
rs_user.Find "usr='" & TxtNewUser & "'"
http://www.chetanasprojects.com
http://www.chetanasprojects.com
'SELECT TAB 1
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
End Sub
Private Sub TxtCurPwd_GotFocus()
Call Book.selectTxt(TxtCurPwd)
End Sub
Private Sub TxtCurPwd_KeyPress(KeyAscii As Integer)
If KeyAscii = 39 Or KeyAscii = 34 Or KeyAscii = 32 Then
KeyAscii = 0
End If
KeyAscii = Book.upper(KeyAscii)
End Sub
Private Sub TxtCurUser_GotFocus()
Call Book.selectTxt(TxtCurUser)
End Sub
Private Sub TxtCurUser_KeyPress(KeyAscii As Integer)
If KeyAscii = 39 Or KeyAscii = 34 Or KeyAscii = 32 Then
KeyAscii = 0
End If
KeyAscii = Book.upper(KeyAscii)
End Sub
Private Sub TxtNewPwd_GotFocus()
Call Book.selectTxt(TxtNewPwd)
End Sub
Private Sub TxtNewPwd_KeyPress(KeyAscii As Integer)
If KeyAscii = 39 Or KeyAscii = 34 Or KeyAscii = 32 Then
KeyAscii = 0
End If
KeyAscii = Book.upper(KeyAscii)
End Sub
Private Sub TxtNewUser_GotFocus()
Call Book.selectTxt(TxtNewUser)
End Sub
Private Sub TxtNewUser_KeyPress(KeyAscii As Integer)
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
rs_user.MoveFirst
rs_user.Find "usr='" & Mid(LstUserDelete.Text, 1,
Len(LstUserDelete.Text) - 4) & "'"
rs_user.Delete 'DELETE USER
Call fillList 'FILL LIST BOX
End If
End Sub
Private Sub Form_Load()
MDIFrm.Pct1.Visible = False
'OPEN RECORDSET
rs_user.Open "select * from Login_Mast", conn, adOpenStatic,
adLockPessimistic
Call fillList 'FILL LIST BOX
End Sub
Private Sub Form_Unload(Cancel As Integer)
rs_user.Close
End Sub
Private Sub fillList()
'FILL ListBox
LstUserDelete.Clear
If rs_user.RecordCount <> 0 Then
rs_user.MoveFirst
While Not rs_user.EOF
LstUserDelete.AddItem rs_user.Fields(0) & " (" &
rs_user.Fields(2) & ")"
rs_user.MoveNext
Wend
LstUserDelete.Text = LstUserDelete.List(0)
End If
End Sub
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
End If
'CHECK USER TYPE
If userType = "L" Then
CmdAdd.Enabled = False
CmdEdit.Enabled = False
CmdDel.Enabled = False
CmdSave.Enabled = False
CmdTransfer.Enabled = False
End If
End Sub
Private Sub CmbMonth_Click()
Dim i As Integer
CmbDay.Clear
For i = 1 To daysOfMonth(Val(CmbMonth.Text),
Val(CmbYear.Text))
CmbDay.AddItem i
Next i
CmbDay.Text = Day(Date)
End Sub
Private Sub CmbSearch_Click()
Call fillMbrGrid(Me, CmbClass.Text, CmbClassYear.Text,
CmbSearch.Text)
End Sub
Private Sub CmbYear_Click()
Dim i As Integer
CmbDay.Clear
For i = 1 To daysOfMonth(Val(CmbMonth.Text),
Val(CmbYear.Text))
CmbDay.AddItem i
Next i
CmbDay.Text = Day(Date)
End Sub
Private Sub CmdAdd_Click()
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
End Sub
Private Sub CmdExit_Click()
If CmdExit.Caption = "&Cancel" Then
CmdExit.Caption = "E&xit"
'DISABLE ALL CONTROLS
Call Member.controlEnable(Me, False)
FremCategory.Enabled = True 'ENABLE SEARCH FREM
Call Member.clearControl(Me) 'CLEAR CONTROLS
If rs_mbr.RecordCount <> 0 Then
rs_mbr.MoveFirst
Call Book.enableCommand(Me) 'ENABLE BUTTON
'RETRIVE RECORD
Call Member.memberData(Me, rs_mbr)
Else
Call Book.disableCommand(Me) 'DISABLE BTNS
Call Member.clearControl(Me) 'CLEAR CONTROLS
CmdAdd.Enabled = True
End If
Call Member.controlEnable(Me, False) 'LOCK TEXT BOXES
CmdSave.Enabled = False
CmbClass.Enabled = True 'ENABLE COURCE COMBO
CmbClassYear.Enabled = True 'ENABLE YEAR COMBO
ElseIf CmdExit.Caption = "E&xit" Then
Unload Me
End If
End Sub
Private Sub CmdFirst_Click()
rs_mbr.MoveFirst 'MOVE RECORD TO FIRST
'RETRIVE MEMBER DATA
Call Member.memberData(Me, rs_mbr)
End Sub
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
sex = "M"
Else
sex = "F"
End If
'ADD RECORD
If cmd = "Add" Then
Qry = "insert into Mbr_Mast values ('" & TxtCode & "','" &
TxtSurname & "','" & _
TxtFirst & "','" & TxtLast & "','" & dt & "','" & TxtAddress & "','"
&_
TxtCity & "','" & CmbClass.Text & "','" & CmbClassYear.Text
& "','" & _
TxtContact & "','" & sex & "'," & TxtFee & ",0)"
conn.Execute Qry
Call CmbClassYear_Click 'TO RETRIVE UPDATED DATA
Call CmdExit_Click 'TO RESET CONTROLS
MsgBox "Record added successfully.", vbInformation,
"Member Entry"
ElseIf cmd = "Edit" Then 'EDIT RECORD
Qry = "update Mbr_Mast set [surname]='" & TxtSurname & "',
[member]='" & _
TxtFirst & "', [father]='" & TxtLast & "', [Join_Dt]='" & dt & "',
[Address]='" & _
TxtAddress & "',[City]='" & TxtCity & "', [Cnt_No]='" & _
TxtContact & "',[Gender]='" & sex & "',[Fee]=" & TxtFee & "
where [Code]='" & _
TxtCode & "'" & " and [Crs]='" & Class & "' and [Yer]='" & Yer
& "'"
MsgBox Qry
conn.Execute Qry
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
ShapLabel.Width = Me.ScaleWidth
LblLabel.Left = ShapLabel.Width / 2 - LblLabel.Width / 2
End If
End Sub
Private Sub Form_Unload(Cancel As Integer)
rs_mbr.Close
If Forms.Count = 2 Then
MDIFrm.Pct1.Visible = True
End If
End Sub
Private Sub MsfgSearch_Click()
rs_mbr.MoveFirst
rs_mbr.Find "Code = '" &
MsfgSearch.TextMatrix(MsfgSearch.Row, 1) & "'"
Call memberData(Me, rs_mbr) 'fill controls
End Sub
Private Sub MsfgSearch_RowColChange()
rs_mbr.MoveFirst
rs_mbr.Find "Code = '" &
MsfgSearch.TextMatrix(MsfgSearch.Row, 1) & "'"
Call memberData(Me, rs_mbr) 'fill controls
End Sub
Private Sub TxtAddress_GotFocus()
Call Book.selectTxt(TxtAddress)
End Sub
Private Sub TxtAddress_KeyPress(KeyAscii As Integer)
If KeyAscii = 39 Then
KeyAscii = 0
Exit Sub
End If
KeyAscii = Book.upper(KeyAscii)
http://www.chetanasprojects.com
http://www.chetanasprojects.com
End Sub
Private Sub TxtCity_GotFocus()
Call Book.selectTxt(TxtCity)
End Sub
Private Sub TxtCity_KeyPress(KeyAscii As Integer)
KeyAscii = alpha(KeyAscii)
End Sub
Private Sub TxtCode_GotFocus()
Call Book.selectTxt(TxtCode)
End Sub
Private Sub TxtCode_KeyPress(KeyAscii As Integer)
If KeyAscii < Asc("0") Or KeyAscii > Asc("9") Then
KeyAscii = 0
End If
End Sub
Private Sub TxtContact_GotFocus()
Call Book.selectTxt(TxtContact)
End Sub
Private Sub TxtContact_KeyPress(KeyAscii As Integer)
If KeyAscii = 8 Then
KeyAscii = 8
ElseIf (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii
<> Asc("-") Then
KeyAscii = 0
End If
End Sub
Private Sub TxtFee_GotFocus()
Call Book.selectTxt(TxtFee)
End Sub
Private Sub TxtFee_KeyPress(KeyAscii As Integer)
If KeyAscii = 8 Then
KeyAscii = 8
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
TxtSearch.Locked = False
End Sub
Private Sub TxtSearch_KeyPress(KeyAscii As Integer)
If KeyAscii = 39 Then
KeyAscii = 0
End If
KeyAscii = upper(KeyAscii)
End Sub
Private Sub TxtSurname_GotFocus()
Call Book.selectTxt(TxtSurname)
End Sub
Private Sub TxtSurname_KeyPress(KeyAscii As Integer)
KeyAscii = Member.alpha(KeyAscii)
End Sub
'===================================================
Private Sub fillMbrGrid1(Frm As Form, rs As Recordset)
Dim r As Integer
Frm.MsfgSearch.Cols = 8
Frm.MsfgSearch.Rows = rs.RecordCount + 1
If rs.RecordCount > 0 Then
rs.MoveFirst
For r = 1 To rs.RecordCount
Frm.MsfgSearch.TextMatrix(r, 0) = r
Frm.MsfgSearch.TextMatrix(r, 0) = r
Frm.MsfgSearch.TextMatrix(r, 1) = rs.Fields(0)
Frm.MsfgSearch.TextMatrix(r, 2) = rs.Fields(1) & " " &
rs.Fields(2) & " " & rs.Fields(3)
Frm.MsfgSearch.TextMatrix(r, 3) = Format(rs.Fields(4),
"dd-mm-yyyy")
Frm.MsfgSearch.TextMatrix(r, 4) = rs.Fields(6)
Frm.MsfgSearch.TextMatrix(r, 5) = rs.Fields(9)
Frm.MsfgSearch.TextMatrix(r, 6) = rs.Fields(10)
Frm.MsfgSearch.TextMatrix(r, 7) = rs.Fields(12)
rs.MoveNext
Next
http://www.chetanasprojects.com
http://www.chetanasprojects.com
End If
End Sub
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
rs.MoveNext
Loop
End If
End Sub
Private Sub CmbClassYearTo_Click()
Set rs1 = New Recordset
rs1.Open "SELECT * FROM Mbr_Mast WHERE [Crs]='" &
CmbClassTo.Text & _
"' AND [Yer]='" & CmbClassYearTo.Text & "' ORDER BY
Code", conn, adOpenStatic, adLockReadOnly
LstTo.Clear
If rs1.RecordCount > 0 Then
Do While Not rs1.EOF
LstTo.AddItem rs1.Fields(0) & " " & _
rs1.Fields(1) & " " & rs1.Fields(2) & " " & rs1.Fields(3)
rs1.MoveNext
Loop
End If
End Sub
Private Sub CmdCancel_Click()
Unload Me
FrmMember.Show
End Sub
Private Sub CmdTransfer_Click()
'WHEN TRANSFER TO SAME CLASS & YEAR
If CmbClassFrom.Text = CmbClassTo.Text And
CmbClassYearFrom.Text = CmbClassYearTo.Text Then
MsgBox "Member can not transfer to same class and year",
vbInformation, "Member Transfer"
Exit Sub
End If
http://www.chetanasprojects.com
http://www.chetanasprojects.com
If rs1.RecordCount = 0 Then
Qry = "UPDATE Mbr_Mast SET [Crs]='" & CmbClassTo.Text &
_
"',[Yer]='" & CmbClassYearTo.Text & "' WHERE [Crs]='" & _
CmbClassFrom.Text & "' AND [Yer]='" &
CmbClassYearFrom.Text & "'"
conn.Execute Qry
MsgBox "Member transmitted successfully.", vbInformation,
"Member Transfer"
LstFrom.Clear
Call CmbClassYearTo_Click 'TO RETRIVE UPDATED DATA
Else
MsgBox "Destination Class is not empty.", vbInformation,
"Member Transfer"
End If
End Sub
Private Sub Form_Load()
CmbClassFrom.Text = CmbClassFrom.List(0)
CmbClassTo.Text = CmbClassTo.List(0)
End Sub
'===================================================
'FILL YEAR COMBO BOX
Public Sub fillYear(c As Control, y As Control)
y.Clear
If c.Text = "BBA" Or c.Text = "BCOM" Then
y.AddItem "FY"
y.AddItem "SY"
http://www.chetanasprojects.com
http://www.chetanasprojects.com
y.AddItem "TY"
ElseIf c.Text = "PGDCA" Or c.Text = "DCS" Then
For i = 1 To 2
y.AddItem "SEM" & i
Next
Else
For i = 1 To 6
y.AddItem "SEM" & i
Next
End If
End Sub
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com
http://www.chetanasprojects.com