Upload
honestguy09
View
3.377
Download
3
Embed Size (px)
Citation preview
ON
SCHOOL INFORMATION SYSTEM
BY:SHASHI KANT DUBEY BCA(2000-2002)ENROLLMENT NO: 993513770
INDIRA GANDHI NATIONAL OPEN UNIVERSITY
ST. XAVIER SCHOOLPATNA
Acknowledgement
There are people, who simply by being what they are, influence and inspire you to do things you are never thought yourself capable of doing.Among these are my project guides, family members to whom I wish to extend my gratitude on the event of completing my project work.I would first like to thanks Mr. Amit Kumar for his timely suggestion and co-operation without which this project would have been an unfulfilled dream for me.
My project Guide, Mr. Prabhat Kumar guided me a lot while doing the project.
My parents, who have made me competent to face challenging tasks.I have pleasure in thanking them for their genius help in this project.
CONTENTS
S. NO. TOPICS PAGE NO.
1. INTRODUCTION2. OBJECTIVE3. TOOLS/ENVIRONMENT4. A COMPLETE ANALYSIS & DESIGN REPORT5. PROGRAM STRUCTURE 6. CODING7. OUTPUT8. LIMITATIONS OF THE PROJECT & FUTURE
APPLICATION9. BIBLIOGRAPHY
INTRODUCTION
Today in the growing world no people can wait for five minutes or more to solve their problems. They want their problems are to be solved very fast within minutes or seconds. We shall have to be changed according to the changing world scenario otherwise we would be outdated. According to the changing scenario we have to accept the new technologies and implement these into our day-to-day life. Computers have became very important, but computer cannot work everywhere in the same situation. We need customized application software, which solves our problems very efficiently. So my project is here fully based on the requirement of New Delhi --------- School. It can partially solve the problems of school. With the help of this project the mentioned school can maintain its day-to-day records of the students, teachers, fee-details of the students etc. this is the project which has been developed in MS-VISUAL BASIC 6.0 as front-end and ORACLE 8i as backend.
OBJECTIVE
Student information system. Teacher information system. Fee- information system. Bill-card system. Dues information system.
TOOLS / ENVIRONMENT
SYSTEM CONFIGURATION (CLIENT)
Processor : Intel’s 486 or higherHard Disk : 2 GBRAM : 16 MBCache Memory: 128 KBFDD : 3.5 InchesCD-ROM : 52x MAXMonitor : Color 14 InchesKeyboard : 104 keysMouse : SerialPrinter : Dot Matrix
Features of Visual Basic
Using Visual Basic is the Quickest and easiest way to create powerful, full-featured application that take advantage of the graphical user interface in Microsoft Windows. For companies developing custom applications. Visual Basic reduces development time and cost intuitive interface makes Visual Basic an excellent tool for programmers.
New users benefit from mouse operations and a consistent look and feel: more advanced users benefit from ease-of-use features, such as drop-down list boxes and multiple-windows applications.
Visual Basic provides the basis for the programming language used in all Microsoft Office application, Microsoft Visual Basic for applications and for a variety of applications from other vendors.
Visual Basic supports a number of features that make it an excellent language for quickly creating full-featured solutions, including.
Data access featuresData access features allow you to create databases, front-end applications, and scalable server-side components for most database formats, including Microsoft SQL Server and other enterprise-level databases.
ActiveX technologiesActiveX technologies allow you to use the functionality provided by other applications like Microsoft Word Processor, Microsoft Excel spreadsheet, and other Windows applications. You
can even automate applications and objects created using the professional or Enterprise edition of Visual Basic.
Internet CapabilitiesInternet Capabilities make it easy to provide access to documents and application across the Internet, or an Internet, form within your application, or to create Internet server applications.
Rapid Application Development (RAD) Support for multilingual applications Interactive debugging support
DATABASE MANAGEMENT SYSTEM (DBMS)
DBMS is generalized software designed to manage the database efficiently, providing facilities for organizations access the control. The DBMS provide the mechanism whereby a set of universe of diverse users i.e. provide multiple user vies of data physical representation.
Organization facilities provided by DBMS software packages are representing the user’s view of data in such a way that it can be produced efficiently from a single storage implementation.
Access facilities of DBMS software packages strive to maintain the database with a high degree of integrity. Such
facilities are usuall provided in the form of auxiliary data services.
ADVANTAGES OF RELATIONAL APPROACH
THE RELATIONAL SYSTEM OFFER Benefits such as easy access to all data, flexibility in data modeling. Reduces data storage and redundancy, independence of physical storage and logical data design and high level data manipulation language SQL. As the technologies associated with RDBMS have grown rapidly in recent years, the appeals of relational database have become apparent to a much wider audience. The phenomenal growth of the relational technology has laid to more demand for RDBMS in environment raging from PCs to large, highly secure CPUs with users ranging from very casual to very sophisticated. Some of the advantage of relational approach over other approaches to database management are as follows.
Power: The relational approach is a very powerful and flexible in access to information and interrelating information without and programming concepts.
Adaptability: The features that make the relational approach more capable of accommodating changes are the immunity of the application programs activities.
Data Independence: The relational approach is the only one offer the four imp.Investment- protection features such as physical data independence, logical data independence integrity independence and distribution independence.Productivity: The ability to end user to make direct use of information relational databases without assistance is undoubtedly the primary reason why the RDBMS market has been expanded so quickly.
Person to person communicability: with the relational approach an executive can, readily communicate with colleagues about the information stored in the database actions.
Databases controllability: The relational model was designed to provide much stronger machinery for maintaining the entity integrity and referential integrity but also domain integrity, column integrity and defined integrity.
Flexibility authorization: The relational model, on the other hand, use view to definition to determine the portion of database to which access will be permitted.
A user is permitted by the system to access one or more specified views only and to use certain specified relational operators only on each view.
Integritability: RDBMS offer a powerful, multiple record-at-a-time languages making it to easier to develop the produce on top.
Distributability: The five principles reason for the success of relational in managing distributed data bases are decompsition, flexibility, recom affort ability, power, economy of transmission, analyzability of intent and independence.
Optimizability: The translation from source code to efficient target code is usually called optimization problem. Almost all of the present RDBMSs have superior capabilities in this area.
Ease of conversion: All information in a database is perceived in the form of values. The language used in creating and
manipulation relational database is a much higher level & will be much easier to convert to whatever approach replaces the relational model.
Concurrent action by multiple processing units to archive fault tolerance: One advantage of relational approach is that it tends itself to a higher degree of concurrent action, which with an appropiate architecture, in turns leads to a higher degree of fault tolerance.
ORACLE RDBMS:ORACLE is a powerful RDBMS product that provides efficient and effective for major databases features. These include large database and space management control, many concurrent database user, high transaction processing performance. High availability, control availability, management security, database enforce integrity, client/server, distributed database system protability, connectivity.
Prior to SQL, there was no standard access language. The SQL relational databse interface was developed by IBM in late 1970s. ANSI and ISO have adopted SQL as a standard language for RDBMS access.
The ORACLE family of database products includes several powerful applications development and generation tools these tools provide complete facilities, that system designers and developers can use to design, develop and test s/w products.
ORACLE is a modular system that consists of ORACLE databse and several functional programs. These components can be viewed as tools and used independently. ORACLE’s tools do the four types of work:
Databse management. Data Access and manipulation. Programming. Connectivity.
FEATURES OF ORACLE:
1. Efficient multi-user support and consistency:
Application that do on-line transaction processing benefits most from low level locking allows multiple users to access different rows in the same table concurrently. The resulting performance gain is significant. ORACLE data integrity is maintained by oracle protecting data and structure.
2. Ease of Administration: Oracle can provide compressive set of power utilities for confiruring and implementing the application.
3. Powerful security features: Oracle guarantees data security by letting DBA specify data each user is permitted to access or modify.
4. Fault Tolerance: Oracle is transaction oriented that is it used transactions to ensure data integrity. In the event of success crash or an abnormal shutdown, failure of application program in middle of transaction, the database is automatically restored to its former (pre transaction) state.
The ORACLE precompilers let the programmers pack the power and flexibility of SQL in application programs. We can use SQL in familiar
High Level Languages such as C, COBOL, PASCAL and PL/1. A conventional easy to use interface lets the application access the ORACLE directly.
Unlike many application development tools, the oracles precompilers lets the user create highly customized application. For e.g. we can create user interface that incorporate the latest windowing and mouse technology, can also creates application that run in the back ground without any user interactions. They help the user find--- tune his application, allow close monitoring of resources use, SQL statement execution.Although pre compiling at the step to the application development process it save times because the pre-compiler
Translates each embedded SQL statement into several native languages oracle calls.
A COMPLETE ANALYSIS & DESIGN REPORT
Tables of the Database
CODING
FORM:- WELCOME FORM
Dim k As Integer, i As Integer, j As Integer, l As IntegerDim p As Integer, u As Integer
Private Sub Command1_Click() If Trim(Text1.Text) = "amit" And Trim(Text2.Text) = "kumar" Then Form18.Hide MDIForm1.Show Else
If Trim(Text1.Text) <> "amit" Then MsgBox "User Name Is Worng ", vbOKOnly Text1.SetFocus Text1.Text = "" u = u + 1 Else If Trim(Text2.Text) <> "kumar" Then MsgBox "Password Is Worng ", vbOKOnly Text2.SetFocus Text2.Text = "" p = p + 1 End If End If End If If u = 3 Or p = 3 Then End End If End Sub
Private Sub Command2_Click()EndEnd Sub
Private Sub Form_Load()k = 0i = 10j = 20l = 15Timer1.Interval = 200Text2.Text = ""End Sub
Private Sub Timer1_Timer()k = k + 10i = i + 10j = j + 10l = l + 5If k = 90 Thenk = 0
End IfIf i = 90 Theni = 10End IfIf j = 90 Thenj = 20End IfIf l = 90 Thenl = 15End IfLabel1.FontSize = 30Label2.FontSize = 30Label3.FontSize = 30Label4.FontSize = 30Label1.ForeColor = 255 * k + (255 + (k / 100 * 255) * 255)Label2.ForeColor = 255 * j + (255 + (j / 100 * 255) * 255)Label3.ForeColor = 255 * i + (255 + (i / 100 * 255) * 255)Label4.ForeColor = 255 * i + (255 + (i / 100 * 255) * 255)End Sub
FORM:- MDI FORM
Private Sub ex_Click()EndEnd Sub
Private Sub f1_Click(Index As Integer)Form2.ShowEnd Sub
Private Sub f2_Click(Index As Integer)Form19.ShowEnd Sub
Private Sub f3_Click(Index As Integer)Form20.ShowEnd Sub
Private Sub f4_Click(Index As Integer)Form4.ShowEnd Sub
Private Sub n1_Click(Index As Integer)Form28.ShowEnd Sub
Private Sub n2_Click(Index As Integer)Form30.ShowEnd Sub
Private Sub n3_Click(Index As Integer)Form31.ShowEnd Sub
Private Sub n4_Click(Index As Integer)Form29.ShowEnd Sub
Private Sub n6_Click(Index As Integer)Form34.ShowEnd Sub
Private Sub nt1_Click(Index As Integer)Form9.ShowEnd Sub
Private Sub nt2_Click(Index As Integer)Form10.ShowEnd Sub
Private Sub nt3_Click(Index As Integer)Form11.ShowEnd Sub
Private Sub nt4_Click(Index As Integer)Form16.ShowEnd Sub
Private Sub nt5_Click(Index As Integer)Form17.ShowEnd Sub
Private Sub p1_Click(Index As Integer)Form21.ShowEnd Sub
Private Sub p2_Click(Index As Integer)Form22.ShowEnd Sub
Private Sub p3_Click(Index As Integer)Form23.ShowEnd Sub
Private Sub s1_Click(Index As Integer)Form24.ShowEnd Sub
Private Sub s2_Click(Index As Integer)Form26.ShowEnd Sub
Private Sub s3_Click(Index As Integer)Form27.ShowEnd Sub
Private Sub s4_Click(Index As Integer)Form25.ShowEnd Sub
Private Sub s6_Click(Index As Integer)Form33.ShowEnd Sub
Private Sub std1_Click(Index As Integer)
Form1.ShowForm1.Text2.SetFocusEnd SubPrivate Sub std2_Click(Index As Integer)Form6.ShowForm6.Command1.SetFocusEnd SubPrivate Sub std3_Click(Index As Integer)Form32.ShowForm32.Command1.SetFocusEnd SubPrivate Sub std4_Click(Index As Integer)Form12.ShowEnd SubPrivate Sub t1_Click(Index As Integer)Form3.ShowEnd SubPrivate Sub t2_Click(Index As Integer)Form7.ShowEnd Sub
Private Sub t3_Click(Index As Integer)Form8.ShowEnd Sub
Private Sub t4_Click(Index As Integer)Form14.ShowEnd Sub
Private Sub t5_Click(Index As Integer)Form15.ShowEnd Sub
FORM:- STUDENT ENTRY
Dim rs As ADODB.RecordsetDim cn As ADODB.ConnectionDim k As IntegerPrivate Sub Combo3_LostFocus()Dim nm As String, nm1 As StringDim i As Integer
Set rs = New ADODB.Recordsetrs.Open "select * from student", cni = 1Do While Not rs.EOF nm = rs("class") nm1 = rs("section") If Trim(nm) = Combo2 And Trim(nm1) = Combo3 Then i = i + 1 End If rs.MoveNextLoopText3.Text = iEnd SubPrivate Sub Command1_Click()Dim ans As StringText9.Text = Left(Text9.Text, 7)Text10.Text = Left(Text10.Text, 7)
Set rs = cn.Execute("insert into student values('" & Text1.Text & "','" & Text2.Text & "','" & Combo2 & "','" & Combo3 & "'," & Text3.Text & ",'" & DTPicker1 & "','" & Text4.Text & "','" & Combo1 & "','" & Text5.Text & "','" & Text6.Text & "','" & Text7.Text & "','" & Text8.Text & "'," & Text9.Text & "," & Text10.Text & ",'" & Text11.Text & "','" & Text12.Text & "','" & Text13.Text & "'," & k & ")")k = k + 1If k > 0 And k <= 9 Then Text1.Text = "S-000" + Trim(k)ElseIf k > 9 And k <= 99 Then Text1.Text = "S-00" + Trim(k)Else If k > 99 And k <= 999 Then Text1.Text = "S-0" + Trim(k)Else If k > 999 And k <= 9999 Then Text1.Text = "S-" + Trim(k)End IfEnd IfEnd IfEnd If
Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""ans = MsgBox("Wish To Continue Enter Record", vbYesNo)If ans = vbYes Then Text2.SetFocusElse Command2.SetFocus 'Form3.Hide 'MDIForm1.Show End IfCommand1.Enabled = FalseEnd Sub
Private Sub Command2_Click()Form1.HideMDIForm1.ShowEnd Sub
Private Sub Form_Activate()Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from student ", cnDo While Not rs.EOF k = rs("no") rs.MoveNextLoop
k = k + 1If k > 0 And k <= 9 Then Text1.Text = "S-000" + Trim(k)ElseIf k > 9 And k <= 99 Then Text1.Text = "S-00" + Trim(k)Else If k > 99 And k <= 999 Then Text1.Text = "S-0" + Trim(k)Else If k > 999 And k <= 9999 Then Text1.Text = "S-" + Trim(k)End IfEnd IfEnd IfEnd IfText13.Text = DateCombo1.Text = "Male"Combo2.Text = "STD1"Combo3.Text = "A"DTPicker1.Value = DateCommand1.Enabled = FalseEnd Sub
Private Sub Text10_LostFocus()If Trim(Text10.Text) = "" Then 'Text10.SetFocus 'MsgBox "Please Enter Record", vbOKOnly Text10.Text = 0Else If Trim(Text10.Text) >= "A" And Trim(Text10.Text) <= "z" Then Text10.SetFocus MsgBox "Not Enter Character" Text10.Text = "" Else Text11.SetFocus End If
End IfEnd Sub
Private Sub Text11_LostFocus()If Trim(Text11.Text) = "" Then Text11.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse Text12.SetFocusEnd IfEnd Sub
Private Sub Text12_LostFocus()If Trim(Text12.Text) = "" Then Text12.SetFocus MsgBox "Please Enter Record", vbOKOnly Else Command1.Enabled = True Command1.SetFocusEnd IfEnd Sub
Private Sub Text2_LostFocus()If Trim(Text2.Text) = "" Then Text2.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse If Trim(Text2.Text) >= "A" And Trim(Text2.Text) <= "z" Then Combo2.SetFocus Else Text2.SetFocus MsgBox "Not Enter Number" Text2.Text = "" End IfEnd IfEnd Sub
Private Sub Text4_LostFocus()
If Trim(Text4.Text) = "" Then Text4.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse If Trim(Text4.Text) >= "A" And Trim(Text4.Text) <= "z" Then Combo1.SetFocus Else Text4.SetFocus MsgBox "Not Enter Number" Text4.Text = "" End IfEnd IfEnd Sub
Private Sub Text5_LostFocus()If Trim(Text5.Text) = "" Then Text5.SetFocus MsgBox "Please Enter Record"Else If Trim(Text5.Text) >= "A" And Trim(Text5.Text) <= "z" Then Text6.SetFocus Else Text5.SetFocus MsgBox "Not Enter Number" Text5.Text = "" End IfEnd IfEnd SubPrivate Sub Text6_LostFocus()If Trim(Text6.Text) = "" Then Text6.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse If Trim(Text6.Text) >= "A" And Trim(Text6.Text) <= "z" Then Text7.SetFocus Else Text6.SetFocus MsgBox "Not Enter Number" Text6.Text = "" End If
End IfEnd Sub
Private Sub Text8_LostFocus()If Trim(Text8.Text) = "" Then Text8.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse If Trim(Text8.Text) >= "A" And Trim(Text8.Text) <= "z" Then Text9.SetFocus Else Text8.SetFocus MsgBox "Not Enter Number" Text8.Text = "" End IfEnd IfEnd Sub
Private Sub Text9_LostFocus()If Trim(Text9.Text) = "" Then 'Text9.SetFocus 'MsgBox "Please Enter Record", vbOKOnly Text9.Text = 0Else If Trim(Text9.Text) >= "A" And Trim(Text9.Text) <= "z" Then Text9.SetFocus MsgBox "Not Enter Character" Text9.Text = "" Else Text10.SetFocus End IfEnd IfEnd SubPrivate Sub Text7_LostFocus()If Trim(Text7.Text) = "" Then Text7.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse If Trim(Text7.Text) >= "A" And Trim(Text7.Text) <= "z" Then Text8.SetFocus Else
Text7.SetFocus MsgBox "Not Enter Number" Text7.Text = "" End IfEnd IfEnd Sub
FORM:-ALL STUDENT ENQUIRY
Dim rs As ADODB.RecordsetDim cn As ADODB.ConnectionDim i As Integer, k As Integer
Private Sub Command1_Click()Set rs = cn.Execute("select * from student")bgrid.Cols = 17bgrid.Rows = rs.RecordCount + 1bgrid.Row = 0bgrid.Col = 0bgrid.ColWidth(0) = 1750bgrid.Text = "Student code"bgrid.Col = 1bgrid.Text = "Name"bgrid.Col = 2bgrid.Text = "Class"bgrid.Col = 3bgrid.Text = "Section"bgrid.Col = 4bgrid.Text = "Roll"bgrid.Col = 5bgrid.Text = "Date of birth"bgrid.Col = 6bgrid.Text = "P_cl_st"
bgrid.Col = 7bgrid.Text = "Sex"bgrid.Col = 8bgrid.Text = " Father name"bgrid.Col = 9bgrid.Text = "Mother name"bgrid.Col = 10bgrid.Text = "Father Occuption"bgrid.Col = 11bgrid.Text = "Mother Occuption"bgrid.Col = 12bgrid.Text = "Tele Res"bgrid.Col = 13bgrid.Text = "Tele Off"bgrid.Col = 14bgrid.Text = "Present Address"bgrid.Col = 15bgrid.Text = "Premanent Address"bgrid.Col = 16bgrid.Text = "Admission Date"
'rs.MoveFirstFor i = 0 To rs.RecordCount - 1bgrid.Row = i + 1bgrid.Col = 0bgrid.Text = rs(0)bgrid.Col = 1bgrid.Text = rs(1)bgrid.Col = 2bgrid.Text = rs(2)bgrid.Col = 3bgrid.Text = rs(3)bgrid.Col = 4bgrid.Text = rs(4)bgrid.Col = 5bgrid.Text = rs(5)bgrid.Col = 6bgrid.Text = rs(6)bgrid.Col = 7bgrid.Text = rs(7)bgrid.Col = 8
bgrid.Text = rs(8)bgrid.Col = 9bgrid.Text = rs(9)bgrid.Col = 10bgrid.Text = rs(10)bgrid.Col = 11bgrid.Text = rs(11)bgrid.Col = 12bgrid.Text = rs(12)bgrid.Col = 13bgrid.Text = rs(13)bgrid.Col = 14bgrid.Text = rs(14)bgrid.Col = 15bgrid.Text = rs(15)bgrid.Col = 16bgrid.Text = rs(16)rs.MoveNextNextEnd Sub
Private Sub Command2_Click()bgrid.ClearForm6.HideMDIForm1.ShowEnd Sub
Private Sub Form_Activate()Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from student order by std_code ", cnEnd Sub
FORM:- CLASSBY ENQUIRY FORM
Dim rs As ADODB.RecordsetDim cn As ADODB.ConnectionDim i As Integer, k As Integer
Private Sub Command1_Click()Set rs = cn.Execute("select * from student where class='" & Combo1.Text & "' and section= '" & Combo2.Text & "'")bgrid.Cols = 15bgrid.Rows = rs.RecordCount + 1bgrid.Row = 0bgrid.Col = 0bgrid.ColWidth(0) = 1750bgrid.Text = "Student code"bgrid.Col = 1bgrid.Text = "Name"bgrid.Col = 2bgrid.Text = "Roll"bgrid.Col = 3bgrid.Text = "Date of birth"bgrid.Col = 4bgrid.Text = "P_cl_st"bgrid.Col = 5bgrid.Text = "Sex"bgrid.Col = 6bgrid.Text = " Father name"bgrid.Col = 7bgrid.Text = "Mother name"bgrid.Col = 8
bgrid.Text = "Father Occuption"bgrid.Col = 9bgrid.Text = "Mother Occuption"bgrid.Col = 10bgrid.Text = "Tele Res"bgrid.Col = 11bgrid.Text = "Tele Off"bgrid.Col = 12bgrid.Text = "Present Address"bgrid.Col = 13bgrid.Text = "Premanent Address"bgrid.Col = 14bgrid.Text = "Admission Date"
'rs.MoveFirstFor i = 0 To rs.RecordCount - 1bgrid.Row = i + 1bgrid.Col = 0bgrid.Text = rs(0)bgrid.Col = 1bgrid.Text = rs(1)'bgrid.Col = 2'bgrid.Text = rs(2)'bgrid.Col = 3'bgrid.Text = rs(3)bgrid.Col = 2bgrid.Text = rs(4)bgrid.Col = 3bgrid.Text = rs(5)bgrid.Col = 4bgrid.Text = rs(6)bgrid.Col = 5bgrid.Text = rs(7)bgrid.Col = 6bgrid.Text = rs(8)bgrid.Col = 7bgrid.Text = rs(9)bgrid.Col = 8bgrid.Text = rs(10)bgrid.Col = 9bgrid.Text = rs(11)
bgrid.Col = 10bgrid.Text = rs(12)bgrid.Col = 11bgrid.Text = rs(13)bgrid.Col = 12bgrid.Text = rs(14)bgrid.Col = 13bgrid.Text = rs(15)bgrid.Col = 14bgrid.Text = rs(16)rs.MoveNextNextEnd Sub
Private Sub Command2_Click()bgrid.ClearForm32.HideMDIForm1.ShowEnd Sub
Private Sub Form_Activate()Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from student order by std_code ", cnText1.Text = DateCombo1.Text = "STD1"Combo2.Text = "A"End Sub
FORM:- STUDENT EDITING FORM
Dim rs As ADODB.Recordset
Dim cn As ADODB.Connection
Dim rs1 As ADODB.RecordsetDim cn1 As ADODB.Connection
Dim k As String
Private Sub Command1_Click()Set rs = cn.Execute("select *from student where std_code='" & Combo1 & "'")abcText1.SetFocusCommand3.Enabled = TrueCommand4.Enabled = TrueEnd Sub
Private Sub Command2_Click()Text1.Text = ""Combo3.Text = ""Combo4.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""Combo1.ClearForm12.HideMDIForm1.ShowEnd Sub
Private Sub Command3_Click()
Set rs = cn.Execute("update student set name ='" & Text1.Text & "',class='" & Combo3.Text & "',section='" & Combo4.Text &
"',roll=" & Text2.Text & ",st_dob='" & DTPicker1.Value & "',p_class='" & Text3.Text & "',sex= '" & Combo1.Text & "',father_nm= '" & Text4.Text & "',mother_nm= '" & Text5.Text & "',father_occ='" & Text6.Text & "',mother_occ= '" & Text7.Text & "',tel_res=" & Text8.Text & " ,tel_off= " & Text9.Text & ",p_add= '" & Text10.Text & "',pt_add= '" & Text11.Text & "',ad_date= '" & Text12.Text & "' where std_code ='" & Combo1.Text & "'") Command3.Enabled = FalseCombo1.SetFocusEnd Sub
Private Sub Command4_Click()Dim nm As String, nm1 As StringDim i As Integer, j As Integer
Set rs = cn.Execute("delete from student where std_code='" & Combo1.Text & "'")
Set rs = cn.Execute("delete from fee where std_code='" & Combo1.Text & "'")
Set rs = cn.Execute("delete from marks where std_code='" & Combo1.Text & "'")
j = Val(Text4.Text)i = Val(Text4.Text)j = j + 1
Do While Not rs1.EOF nm = rs1("class") nm1 = rs1("section") If Trim(nm) = Trim(Text2.Text) And Trim(nm1) = Trim(Text3.Text) Then Set rs = cn.Execute("update student set roll =" & i & " where class= '" & Trim(Text2.Text) & "' and section= '" & Trim(Text3.Text) & "' and roll=" & j & "") i = i + 1 j = j + 1 End If
rs1.MoveNext Loop Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""Combo2.Text = ""Combo3.Text = ""Combo4.Text = ""Combo1.ClearCombo1.SetFocusCommand3.Enabled = False
Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from student order by std_code ", cnIf rs.EOF Then Command2.SetFocusElse
Combo1.Text = rs(0)End If
Do While Not rs.EOF
Combo1.AddItem rs(0) rs.MoveNextLoopCommand4.Enabled = FalseEnd Sub
Private Sub Form_Activate()Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from student order by std_code ", cnCombo1.Text = rs(0)Do While Not rs.EOF Combo1.AddItem rs(0) rs.MoveNextLoop
Set cn1 = New ADODB.ConnectionWith cn1 .CursorLocation = adUseClient .Provider = "msdaora"End Withcn1.Open "source=kumar; user id= amit; password=kumar;"Set rs1 = New ADODB.Recordsetrs1.Open "select * from student order by std_code ", cn1
Combo2.Text = "Male"Combo3.Text = "STD1"Combo4.Text = "A"Command3.Enabled = FalseCommand4.Enabled = FalseDTPicker1.Value = Date
Text15.Text = Date
End Sub
Public Sub abc()
Text1.Text = rs(1)Combo3.Text = rs(2)Combo4.Text = rs(3)Text2.Text = rs(4)DTPicker1.Value = rs(5)Text3.Text = rs(6)Combo2 = rs(7)Text4.Text = rs(8)Text5.Text = rs(9)Text6.Text = rs(10)Text7.Text = rs(11)Text8.Text = rs(12)Text9.Text = rs(13)Text10.Text = rs(14)Text11.Text = rs(15)Text12.Text = rs(16)End Sub
FORM:- TEACHER ENTRY FORMDim rs As ADODB.RecordsetDim cn As ADODB.Connection
Dim k As Integer
Private Sub Command1_Click()Dim ans As StringText4.Text = Left(Text4.Text, 7)k = k + 1Set rs = cn.Execute("insert into teacher values('" & Text1.Text & "','" & Text2.Text & "','" & Text3.Text & "','" & Combo1 & "'," & Text4.Text & ",'" & DTPicker1 & "','" & Text5.Text & "','" & Text6.Text & "','" & Text7.Text & "','" & DTPicker2 & "'," &
Text8.Text & ",'" & Text9.Text & "','" & Text10.Text & "','" & Text11.Text & "'," & k & ")")If k > 0 And k <= 9 Then Text1.Text = "T-00" + Trim(k)ElseIf k > 9 And k <= 99 Then Text1.Text = "T-0" + Trim(k)Else If k > 99 And k <= 999 Then Text1.Text = "T-" + Trim(k)End IfEnd IfEnd IfText2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""ans = MsgBox("Wish To Continue Enter Record", vbYesNo)If ans = vbYes Then Text2.SetFocusElse Command2.SetFocus End IfEnd Sub
Private Sub Command2_Click()Form3.HideMDIForm1.ShowText1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""
Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""End Sub
Private Sub Form_Activate()Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from teacher order by t_code", cnDo While Not rs.EOF k = rs("no") rs.MoveNextLoopk = k + 1If k > 0 And k <= 9 Then Text1.Text = "T-00" + Trim(k)ElseIf k > 9 And k <= 99 Then Text1.Text = "T-0" + Trim(k)Else If k > 99 And k <= 999 Then Text1.Text = "T-" + Trim(k)End IfEnd IfEnd IfText11.Text = DateDTPicker1.Value = DateDTPicker2.Value = DateCombo1.Text = "Male"Command1.Enabled = FalseText2.SetFocusEnd Sub
Private Sub Text2_LostFocus()If Trim(Text2.Text) = "" Then
Text2.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse If Trim(Text2.Text) >= "A" And Trim(Text2.Text) <= "z" Then Text3.SetFocus Else Text2.SetFocus MsgBox "Not Enter Number" Text2.Text = "" End IfEnd IfEnd SubPrivate Sub Text3_LostFocus()If Trim(Text3.Text) = "" Then Text3.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse If Trim(Text3.Text) >= "A" And Trim(Text3.Text) <= "z" Then Combo1.SetFocus Else Text3.SetFocus MsgBox "Not Enter Number" Text3.Text = "" End IfEnd IfEnd SubPrivate Sub Text4_LostFocus()If Trim(Text4.Text) = "" Then 'Text4.SetFocus 'MsgBox "Please Enter Record", vbOKOnly Text4.Text = 0Else If Trim(Text4.Text) >= "A" And Trim(Text4.Text) <= "z" Then Text4.SetFocus MsgBox "Not Enter Character" Text4.Text = "" Else DTPicker1.SetFocus End IfEnd IfEnd Sub
Private Sub Text5_LostFocus()If Trim(Text5.Text) = "" Then Text5.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse Text6.SetFocusEnd IfEnd SubPrivate Sub Text6_LostFocus()If Trim(Text6.Text) = "" Then Text6.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse Text7.SetFocusEnd IfEnd SubPrivate Sub Text7_LostFocus()If Trim(Text7.Text) = "" Then Text7.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse DTPicker2.SetFocusEnd IfEnd SubPrivate Sub Text8_LostFocus()If Trim(Text8.Text) = "" Then Text8.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse If Trim(Text8.Text) >= "A" And Trim(Text8.Text) <= "z" Then Text8.SetFocus MsgBox "Not Enter Character" Text8.Text = "" Else Text9.SetFocus End IfEnd IfEnd SubPrivate Sub Text9_LostFocus()If Trim(Text9.Text) = "" Then Text9.SetFocus
MsgBox "Please Enter Record", vbOKOnlyElse Text10.SetFocusEnd IfEnd SubPrivate Sub Text10_LostFocus()If Trim(Text10.Text) = "" Then Text10.SetFocus MsgBox "Please Enter Record", vbOKOnlyElse Command1.Enabled = True Command1.SetFocusEnd IfEnd Sub
FORM:- TEACHER ENQUIRY FORMDim rs As ADODB.RecordsetDim cn As ADODB.Connection
Dim i As Integer
Private Sub Command1_Click()Set rs = cn.Execute("select * from teacher")bgrid.Cols = 12bgrid.Rows = rs.RecordCount + 1bgrid.Row = 0bgrid.Col = 0bgrid.Text = "Teacher code"bgrid.Col = 1bgrid.Text = "Name"bgrid.Col = 2bgrid.Text = "Fat/Has Name"bgrid.Col = 3bgrid.Text = "Address"bgrid.Col = 4bgrid.Text = "Sex"bgrid.Col = 5bgrid.Text = "Tel No"bgrid.Col = 6bgrid.Text = "Date Of Birth"
bgrid.Col = 7bgrid.Text = "Qualification"bgrid.Col = 8bgrid.Text = "Ex Qualification"bgrid.Col = 9bgrid.Text = "Priv Experience"bgrid.Col = 10bgrid.Text = "Date Of Appointment"bgrid.Col = 11bgrid.Text = "Pay Scale"
'rs.MoveFirstFor i = 0 To rs.RecordCount - 1bgrid.Row = i + 1bgrid.Col = 0bgrid.Text = rs(0)bgrid.Col = 1bgrid.Text = rs(1)bgrid.Col = 2bgrid.Text = rs(2)bgrid.Col = 3bgrid.Text = rs(3)bgrid.Col = 4bgrid.Text = rs(4)bgrid.Col = 5bgrid.Text = rs(5)bgrid.Col = 6bgrid.Text = rs(6)bgrid.Col = 7bgrid.Text = rs(7)bgrid.Col = 8bgrid.Text = rs(8)bgrid.Col = 9bgrid.Text = rs(9)bgrid.Col = 10bgrid.Text = rs(10)bgrid.Col = 11bgrid.Text = rs(11)rs.MoveNextNext i
End Sub
Private Sub Command2_Click()Form8.HideMDIForm1.Showbgrid.ClearEnd Sub
Private Sub Form_Load()Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from teacher order by t_code", cnEnd Sub
FORM:- TEACHER EDITING FORM
Dim rs As ADODB.RecordsetDim cn As ADODB.Connection
Private Sub Command1_Click()Set rs = cn.Execute("select *from teacher where t_code='" & Combo1 & "'")abcText1.SetFocusCommand3.Enabled = TrueCommand4.Enabled = TrueEnd Sub
Private Sub Command2_Click()Combo1.ClearText1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""
Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""
Form14.HideMDIForm1.ShowEnd Sub
Private Sub Command3_Click()Text3.Text = Left(Text3.Text, 7) Set rs = cn.Execute("update teacher set t_name ='" & Text1.Text & "',f_name='" & Text2.Text & "',sex='" & Combo2.Text & "',t_no=" & Text3.Text & ",t_dob='" & DTPicker1.Value & "',quali='" & Text4.Text & "',ex_quali= '" & Text5.Text & "',p_exp= '" & Text6.Text & "',dopa= '" & DTPicker2.Value & "',p_scal=" & Text7.Text & ",p_add='" & Text8.Text & "',pt_add='" & Text9.Text & "' where t_code ='" & Combo1.Text & "'") Command3.Enabled = FalseCombo1.SetFocusEnd Sub
Private Sub Command4_Click()
Set rs = cn.Execute("delete from teacher where t_code='" & Combo1.Text & "'")Set rs = cn.Execute("delete from salary where t_code='" & Combo1.Text & "'") Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Combo2.Text = ""
Combo1.ClearCombo1.SetFocus
Command3.Enabled = FalseSet cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from teacher", cnIf rs.EOF Then Command2.SetFocusElse
Combo1.Text = rs(0)End If
Do While Not rs.EOF Combo1.AddItem rs(0) rs.MoveNextLoopCommand4.Enabled = FalseEnd Sub
Private Sub Form_Activate()Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from teacher order by t_code", cnCombo1.Text = rs(0)Do While Not rs.EOF Combo1.AddItem rs(0) rs.MoveNextLoop
Text10.Text = Date
DTPicker1.Value = DateDTPicker2.Value = DateCommand3.Enabled = FalseCommand4.Enabled = FalseEnd Sub
Public Sub abc()
Text1.Text = rs(1)Text2.Text = rs(2)Combo2.Text = rs(3)Text3.Text = rs(4)DTPicker1.Value = rs(5)Text4.Text = rs(6)Text5.Text = rs(7)Text6.Text = rs(8)DTPicker2.Value = rs(9)Text7.Text = rs(10)Text8.Text = rs(11)Text9.Text = rs(12)End Sub
FORM:- MONTHLY FEE ENTRY FORM
Dim rs As ADODB.RecordsetDim cn As ADODB.Connection
Dim rs1 As ADODB.RecordsetDim cn1 As ADODB.Connection
Dim k As Integer
Private Sub Command1_Click()
Command4.Enabled = True
Set rs = cn.Execute("select *from student where std_code='" & Combo1 & "'")DTPicker1.SetFocusabc
Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""Text13.Text = ""End Sub
Private Sub Command2_Click()Form2.HideMDIForm1.ShowText2.Text = ""Text3.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""Command3.Enabled = FalseText13.Text = ""Text21.Text = ""
End Sub
Private Sub Command3_Click()Dim mm As StringDim yy As Integermm = Format(DTPicker1, "mmmm")yy = Format(DTPicker2, "yyyy")
Set rs = cn.Execute("insert into fee values('" & Text1.Text & "','" & Combo1.Text & "','" & Text2.Text & "'," & Text3.Text & ",'" & mm & "','" & Text5.Text & "','" & Text21.Text & "'," & Val(Text6.Text) & "," & Text7.Text & "," & Text8.Text & "," & Text9.Text & "," & Text10.Text & "," & Text11.Text & "," & Text12.Text & "," & Text13.Text & ",'" & Text22.Text & "'," & yy & "," & k & ")")k = k + 1 Text1.Text = "SN-" + Trim(k) Command3.Enabled = FalseText2.Text = ""Text3.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""Text13.Text = ""Text21.Text = ""Combo1.SetFocusEnd Sub
Private Sub Command4_Click()Command3.Enabled = TrueIf Val(Text6.Text) = 0 Or Trim(Text6.Text) = "A" And Trim(Text6.Text) = "z" ThenText6.Text = 0End IfIf Val(Text7.Text) = 0 Or Trim(Text7.Text) = "A" And Trim(Text7.Text) = "z" ThenText7.Text = 0End IfIf Val(Text8.Text) = 0 Or Trim(Text8.Text) = "A" And Trim(Text8.Text) = "z" ThenText8.Text = 0End IfIf Val(Text9.Text) = 0 Or Trim(Text9.Text) = "A" And Trim(Text9.Text) = "z" Then
Text9.Text = 0End IfIf Val(Text10.Text) = 0 Or Trim(Text10.Text) = "A" And Trim(Text10.Text) = "z" ThenText10.Text = 0End IfIf Val(Text11.Text) = 0 Or Trim(Text11.Text) = "A" And Trim(Text11.Text) = "z" ThenText11.Text = 0End IfIf Val(Text12.Text) = 0 Or Trim(Text12.Text) = "A" And Trim(Text12.Text) = "z" ThenText12.Text = 0End If
Text13.Text = Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text8.Text) + Val(Text9.Text) + Val(Text10.Text) + Val(Text11.Text) + Val(Text12.Text)End Sub
Private Sub DTPicker2_LostFocus()Dim Y As IntegerDim c As String, m As String, s As String
Dim j As String, h As Integerj = Format(DTPicker1, "mmmm")h = Format(DTPicker2, "yyyy")
Set cn1 = New ADODB.ConnectionWith cn1 .CursorLocation = adUseClient .Provider = "msdaora"End Withcn1.Open "source=kumar; user id= amit; password=kumar;"Set rs1 = New ADODB.Recordsetrs1.Open "select * from fee where std_code ='" & Combo1.Text & "' and month='" & j & "' and year= " & h & " ", cn1
Do While Not rs1.EOF c = rs1("std_code") m = rs1("month") Y = rs1("year") If Trim(c) = Combo1 And Trim(m) = Trim(j) And Val(Y) = Val(h) Then MsgBox "This Student Pay Fee In This Month And This Year", vbOKOnly DTPicker1.SetFocus End If rs1.MoveNextLoop End Sub
Private Sub Form_Activate()
Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from student order by std_code ", cnCombo1.Text = rs(0)Do While Not rs.EOF Combo1.AddItem rs(0) rs.MoveNextLoop
Set cn1 = New ADODB.ConnectionWith cn1 .CursorLocation = adUseClient .Provider = "msdaora"End Withcn1.Open "source=kumar; user id= amit; password=kumar;"Set rs1 = New ADODB.Recordsetrs1.Open "select * from fee order by slno ", cn1
Do While Not rs1.EOF k = rs1("no") rs1.MoveNextLoopk = k + 1 Text1.Text = "SN-" + Trim(k) Text22.Text = DateDTPicker2.Value = DateDTPicker1.Value = DateCommand3.Enabled = FalseCommand4.Enabled = FalseCombo1.SetFocusEnd Sub
Public Sub abc()Text2.Text = rs("name")Text21.Text = rs(3)Text5.Text = rs("class")Text3.Text = rs("roll")End Sub
FORM:- STUDENT FEE ENQUIRY FORM
Dim rs As ADODB.RecordsetDim cn As ADODB.Connection
Private Sub Combo1_GotFocus()fgrid.ClearCombo2.ClearEnd Sub
Private Sub Combo1_LostFocus()
Dim str As String
Dim i As Integer, j As Integer, k As Integer, n As Integer, t As Integer, s As IntegerDim yr1(35) As Double, yr2 As Double, yr3(35) As Double'Combo2.Clear
Set rs = cn.Execute("select * from fee") ' where std_code='" & Combo1.Text & "'")Combo2.Text = rs(16)Do While Not rs.EOFstr = rs(1)
If Trim(Combo1.Text) = str Then yr1(n) = rs(16) n = n + 1End Ifrs.MoveNextLoop
n = n - 1j = 0Do While True yr2 = yr1(j)' k = j j = j + 1 i = 0 t = s Do While t <> 0 If yr3(i) = yr2 Then
Exit Do End If i = i + 1 t = t - 1 Loop If t = 0 Then yr3(s) = yr2
s = s + 1 End If If j > n Then Exit Do End If
Loop
For i = 0 To s - 1 Combo2.AddItem (yr3(i))Next
End Sub
Private Sub Combo2_LostFocus()
Command1.Enabled = TrueCommand1.SetFocusEnd Sub
Private Sub Command1_Click()Dim a As String, b As String, c As StringDim d As String, e As String, f As String, g As String, h As String, i As String, j As String, k As String, l As StringSet rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "'")abcfgrid.Cols = 9fgrid.Rows = 13fgrid.Row = 0fgrid.Col = 0fgrid.ColWidth(0) = 1150
fgrid.Text = "Month Name"fgrid.Row = 1fgrid.Text = "January"fgrid.Row = 2fgrid.Text = "February"fgrid.Row = 3fgrid.Text = "March"fgrid.Row = 4fgrid.Text = "April"fgrid.Row = 5fgrid.Text = "May"fgrid.Row = 6fgrid.Text = "June"
fgrid.Row = 7fgrid.Text = "July"fgrid.Row = 8fgrid.Text = "August"fgrid.Row = 9fgrid.Text = "September"fgrid.Row = 10fgrid.Text = "October"fgrid.Row = 11fgrid.Text = "November"fgrid.Row = 12fgrid.Text = "December"
fgrid.Row = 0fgrid.Col = 1fgrid.Text = "Ad_Fee"fgrid.Col = 2fgrid.Text = "Tu_Fee"fgrid.Col = 3fgrid.Text = "Lib_Fee"fgrid.Col = 4fgrid.Text = "Exm_Fee"fgrid.Col = 5fgrid.Text = "Dev_Fee"fgrid.Col = 6fgrid.Text = "Late_Fee"fgrid.Col = 7fgrid.ColWidth(7) = 1100fgrid.Text = "Back_Dues"fgrid.Col = 8fgrid.Text = "Total"
a = "January"b = "February"c = "March"d = "April"e = "May"f = "June"g = "July"h = "August"
i = "September"j = "October"k = "November"l = "December"
Set rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "' and year=" & Combo2.Text & " and month='" & a & "'")For p = 0 To rs.RecordCount - 1fgrid.Col = 1fgrid.Row = p + 1fgrid.Text = rs(7)fgrid.Col = 2fgrid.Text = rs(8)fgrid.Col = 3fgrid.Text = rs(9)fgrid.Col = 4fgrid.Text = rs(10)fgrid.Col = 5fgrid.Text = rs(11)fgrid.Col = 6fgrid.Text = rs(12)fgrid.Col = 7fgrid.Text = rs(13)fgrid.Col = 8fgrid.Text = rs(14)Next
Set rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "' and year=" & Combo2.Text & " and month='" & b & "'")For p = 0 To rs.RecordCount - 1fgrid.Col = 1fgrid.Row = p + 2fgrid.Text = rs(7)fgrid.Col = 2
fgrid.Text = rs(8)fgrid.Col = 3fgrid.Text = rs(9)fgrid.Col = 4fgrid.Text = rs(10)fgrid.Col = 5fgrid.Text = rs(11)fgrid.Col = 6fgrid.Text = rs(12)fgrid.Col = 7fgrid.Text = rs(13)fgrid.Col = 8fgrid.Text = rs(14)Next
Set rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "' and year=" & Combo2.Text & " and month='" & c & "'")For p = 0 To rs.RecordCount - 1
fgrid.Col = 1fgrid.Row = p + 3fgrid.Text = rs(7)fgrid.Col = 2fgrid.Text = rs(8)fgrid.Col = 3fgrid.Text = rs(9)fgrid.Col = 4fgrid.Text = rs(10)fgrid.Col = 5fgrid.Text = rs(11)fgrid.Col = 6fgrid.Text = rs(12)fgrid.Col = 7fgrid.Text = rs(13)fgrid.Col = 8fgrid.Text = rs(14)Next
Set rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "' and year=" & Combo2.Text & " and month='" & d & "'")For p = 0 To rs.RecordCount - 1
fgrid.Col = 1fgrid.Row = p + 4fgrid.Text = rs(7)fgrid.Col = 2fgrid.Text = rs(8)fgrid.Col = 3fgrid.Text = rs(9)fgrid.Col = 4fgrid.Text = rs(10)fgrid.Col = 5fgrid.Text = rs(11)fgrid.Col = 6fgrid.Text = rs(12)fgrid.Col = 7fgrid.Text = rs(13)fgrid.Col = 8fgrid.Text = rs(14)Next
Set rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "' and year=" & Combo2.Text & " and month='" & e & "'")For p = 0 To rs.RecordCount - 1
fgrid.Col = 1fgrid.Row = p + 5fgrid.Text = rs(7)fgrid.Col = 2fgrid.Text = rs(8)fgrid.Col = 3fgrid.Text = rs(9)fgrid.Col = 4fgrid.Text = rs(10)fgrid.Col = 5fgrid.Text = rs(11)
fgrid.Col = 6fgrid.Text = rs(12)fgrid.Col = 7fgrid.Text = rs(13)fgrid.Col = 8fgrid.Text = rs(14)Next
Set rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "' and year=" & Combo2.Text & " and month='" & f & "'")For p = 0 To rs.RecordCount - 1
fgrid.Col = 1fgrid.Row = p + 6fgrid.Text = rs(7)fgrid.Col = 2fgrid.Text = rs(8)fgrid.Col = 3fgrid.Text = rs(9)fgrid.Col = 4fgrid.Text = rs(10)fgrid.Col = 5fgrid.Text = rs(11)fgrid.Col = 6fgrid.Text = rs(12)fgrid.Col = 7fgrid.Text = rs(13)fgrid.Col = 8fgrid.Text = rs(14)Next
Set rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "' and year=" & Combo2.Text & " and month='" & g & "'")For p = 0 To rs.RecordCount - 1
fgrid.Col = 1fgrid.Row = p + 7
fgrid.Text = rs(7)fgrid.Col = 2fgrid.Text = rs(8)fgrid.Col = 3fgrid.Text = rs(9)fgrid.Col = 4fgrid.Text = rs(10)fgrid.Col = 5fgrid.Text = rs(11)fgrid.Col = 6fgrid.Text = rs(12)fgrid.Col = 7fgrid.Text = rs(13)fgrid.Col = 8fgrid.Text = rs(14)Next
Set rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "' and year=" & Combo2.Text & " and month='" & h & "'")For p = 0 To rs.RecordCount - 1
fgrid.Col = 1fgrid.Row = p + 8fgrid.Text = rs(7)fgrid.Col = 2fgrid.Text = rs(8)fgrid.Col = 3fgrid.Text = rs(9)fgrid.Col = 4fgrid.Text = rs(10)fgrid.Col = 5fgrid.Text = rs(11)fgrid.Col = 6fgrid.Text = rs(12)fgrid.Col = 7fgrid.Text = rs(13)fgrid.Col = 8fgrid.Text = rs(14)Next
Set rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "' and year=" & Combo2.Text & " and month='" & i & "'")For p = 0 To rs.RecordCount - 1
fgrid.Col = 1fgrid.Row = p + 9fgrid.Text = rs(7)fgrid.Col = 2fgrid.Text = rs(8)fgrid.Col = 3fgrid.Text = rs(9)fgrid.Col = 4fgrid.Text = rs(10)fgrid.Col = 5fgrid.Text = rs(11)fgrid.Col = 6fgrid.Text = rs(12)fgrid.Col = 7fgrid.Text = rs(13)fgrid.Col = 8fgrid.Text = rs(14)Next
Set rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "' and year=" & Combo2.Text & " and month='" & j & "'")For p = 0 To rs.RecordCount - 1
fgrid.Col = 1fgrid.Row = p + 10fgrid.Text = rs(7)fgrid.Col = 2fgrid.Text = rs(8)fgrid.Col = 3fgrid.Text = rs(9)fgrid.Col = 4fgrid.Text = rs(10)
fgrid.Col = 5fgrid.Text = rs(11)fgrid.Col = 6fgrid.Text = rs(12)fgrid.Col = 7fgrid.Text = rs(13)fgrid.Col = 8fgrid.Text = rs(14)Next
Set rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "' and year=" & Combo2.Text & " and month='" & k & "'")For p = 0 To rs.RecordCount - 1
fgrid.Col = 1fgrid.Row = p + 11fgrid.Text = rs(7)fgrid.Col = 2fgrid.Text = rs(8)fgrid.Col = 3fgrid.Text = rs(9)fgrid.Col = 4fgrid.Text = rs(10)fgrid.Col = 5fgrid.Text = rs(11)fgrid.Col = 6fgrid.Text = rs(12)fgrid.Col = 7fgrid.Text = rs(13)fgrid.Col = 8fgrid.Text = rs(14)Next
Set rs = cn.Execute("select * from fee where std_code='" & Combo1.Text & "' and year=" & Combo2.Text & " and month='" & l & "'")For p = 0 To rs.RecordCount - 1
fgrid.Col = 1
fgrid.Row = p + 12fgrid.Text = rs(7)fgrid.Col = 2fgrid.Text = rs(8)fgrid.Col = 3fgrid.Text = rs(9)fgrid.Col = 4fgrid.Text = rs(10)fgrid.Col = 5fgrid.Text = rs(11)fgrid.Col = 6fgrid.Text = rs(12)fgrid.Col = 7fgrid.Text = rs(13)fgrid.Col = 8fgrid.Text = rs(14)Next
End Sub
Private Sub Command2_Click()Form19.HideMDIForm1.Showfgrid.ClearCombo1.ClearCombo2.ClearText1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""
End Sub
Private Sub Form_Activate()Dim str1(50) As String, str2 As String, str3(50) As String
Dim i As Integer, j As Integer, n As Integer, t As Integer, s As IntegerSet cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from fee order by std_code ", cnCombo1.Text = rs(1)Combo2.Text = rs("year")Do While Not rs.EOF str1(n) = rs(1) n = n + 1 rs.MoveNextLoop
n = n - 1j = 0Do While True str2 = Trim(str1(j)) j = j + 1 i = 0 t = s Do While t <> 0 If Trim(str3(i)) = str2 Then Exit Do End If i = i + 1 t = t - 1 Loop If t = 0 Then str3(s) = str2 s = s + 1 End If If j > n Then Exit Do End If
Loop
For i = 0 To s - 1 Combo1.AddItem (str3(i))NextCombo1.SetFocusCommand1.Enabled = FalseEnd SubPublic Sub abc()Text1.Text = rs("section")Text2.Text = rs("name")Text3.Text = rs("class")Text5.Text = rs("roll")End Sub
FORM:- ALL STUDENT FEE ENQUIRY FORM
Dim rs As ADODB.RecordsetDim cn As ADODB.Connection
Private Sub Command1_Click()fgrid.Cols = 15fgrid.Rows = rs.RecordCount + 1fgrid.Row = 0fgrid.Col = 0fgrid.ColWidth(0) = 1230fgrid.Text = "Student code"
fgrid.Row = 0fgrid.Col = 1fgrid.Text = "Name"fgrid.Col = 2fgrid.Text = "Class"fgrid.Col = 3fgrid.Text = "Roll"fgrid.Col = 4fgrid.Text = "Section"fgrid.Col = 5fgrid.Text = "Month"fgrid.Col = 6
fgrid.Text = "Year"fgrid.Col = 7fgrid.Text = "Add_Fee"fgrid.Col = 8fgrid.Text = "Tu_Fee"fgrid.Col = 9'fgrid.ColWidth(7) = 1100fgrid.Text = "Lib_Fee"fgrid.Col = 10fgrid.Text = "Exm_Fee"fgrid.Col = 11fgrid.Text = "Dev_Fee"fgrid.Col = 12fgrid.Text = "Late_Fee"fgrid.Col = 13fgrid.Text = "Back Dues"fgrid.Col = 14fgrid.Text = "Total"
Set rs = cn.Execute("select * from fee")For i = 0 To rs.RecordCount - 1fgrid.Col = 0fgrid.Row = i + 1fgrid.Text = rs(1)fgrid.Col = 1fgrid.Text = rs(2)fgrid.Col = 2fgrid.Text = rs(5)fgrid.Col = 3fgrid.Text = rs(3)fgrid.Col = 4fgrid.Text = rs(6)fgrid.Col = 5fgrid.Text = rs(4)
fgrid.Col = 6fgrid.Text = rs(16)
fgrid.Col = 7fgrid.Text = rs(7)fgrid.Col = 8
fgrid.Text = rs(8)fgrid.Col = 9fgrid.Text = rs(9)fgrid.Col = 10fgrid.Text = rs(10)fgrid.Col = 11fgrid.Text = rs(11)fgrid.Col = 12fgrid.Text = rs(12)fgrid.Col = 13fgrid.Text = rs(13)fgrid.Col = 14fgrid.Text = rs(14)''fgrid.Col = 15''fgrid.Text = rs(14)''fgrid.Col = 14''fgrid.Text = rs(15)rs.MoveNextNext
End Sub
Private Sub Command2_Click()fgrid.ClearForm20.HideMDIForm1.ShowEnd Sub
Private Sub Form_Activate()Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from fee order by std_code ", cn
End Sub
FORM:- FEE ENQUIRY AND MODIFICATION
Dim rs As ADODB.RecordsetDim cn As ADODB.Connection
Private Sub Combo1_GotFocus()Combo2.ClearEnd Sub
Private Sub Combo1_LostFocus()
Dim str As String
Dim i As Integer, j As Integer, k As Integer, n As Integer, t As Integer, s As IntegerDim tr1(35) As String, tr2 As String, tr3(35) As String
Set rs = cn.Execute("select * from fee") ' where std_code='" & Combo1.Text & "'")Combo2.Text = rs("month")Do While Not rs.EOFstr = rs(1)
If Trim(Combo1.Text) = str Then tr1(n) = rs("month") n = n + 1End Ifrs.MoveNextLoop
n = n - 1j = 0Do While True tr2 = tr1(j)
j = j + 1 i = 0 t = s
Do While t <> 0 If tr3(i) = tr2 Then
Exit Do End If i = i + 1 t = t - 1 Loop If t = 0 Then tr3(s) = tr2
s = s + 1 End If If j > n Then Exit Do End If
Loop
For i = 0 To s - 1 Combo2.AddItem (tr3(i))Next
End Sub
Private Sub Combo2_GotFocus()Combo3.ClearEnd Sub
Private Sub Combo2_LostFocus()Dim str As String, str1 As StringDim i As Integer, j As Integer, k As Integer, n As Integer, t As Integer, s As IntegerDim yr1(35) As Integer, yr2 As Integer, yr3(35) As IntegerSet rs = cn.Execute("select * from fee")Combo3.Text = rs("year")Do While Not rs.EOFstr = rs(1)str1 = rs("month")
If Trim(Combo1.Text) = Trim(str) And Trim(Combo2.Text) = Trim(str1) Then yr1(n) = rs("year") n = n + 1End Ifrs.MoveNextLoop
n = n - 1j = 0Do While True yr2 = yr1(j)
j = j + 1 i = 0 t = s Do While t <> 0 If yr3(i) = yr2 Then
Exit Do End If i = i + 1 t = t - 1 Loop If t = 0 Then yr3(s) = yr2
s = s + 1 End If If j > n Then Exit Do End If
LoopFor i = 0 To s - 1 Combo3.AddItem (yr3(i))Next
End Sub
Private Sub Combo3_LostFocus()Command1.Enabled = TrueEnd Sub
Private Sub Command1_Click()
Set rs = cn.Execute("select *from fee where std_code='" & Combo1.Text & "'and month='" & Combo2.Text & "' and year=" & Combo3.Text & "")Text6.SetFocusabcEnd SubPrivate Sub Command2_Click()Form4.HideMDIForm1.ShowCombo1.Clear'Text1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""Text13.Text = ""End Sub
Private Sub Command3_Click()Set rs = cn.Execute("update fee set name='" & Text2.Text & "',roll=" & Text3.Text & ",class= '" & Text5.Text & "',section='" & Text4.Text & "',add_fee=" & Text6.Text & ",tu_fee=" & Text7.Text & ",lib_fee=" & Text8.Text & ",exm_fee=" & Text9.Text & ",dev_fee=" & Text10.Text & ",late_fee=" &
Text11.Text & ",back_dues=" & Text12.Text & ",total=" & Text13.Text & " where std_code ='" & Combo1.Text & "' and month= '" & Combo2.Text & "' and year= " & Combo3.Text & "") Command3.Enabled = FalseCombo1.SetFocusEnd Sub
Private Sub Command4_Click()If Val(Text6.Text) = 0 Or Trim(Text6.Text) = "A" And Trim(Text6.Text) = "z" ThenText6.Text = 0End IfIf Val(Text7.Text) = 0 Or Trim(Text7.Text) = "A" And Trim(Text7.Text) = "z" ThenText7.Text = 0End IfIf Val(Text8.Text) = 0 Or Trim(Text8.Text) = "A" And Trim(Text8.Text) = "z" ThenText8.Text = 0End IfIf Val(Text9.Text) = 0 Or Trim(Text9.Text) = "A" And Trim(Text9.Text) = "z" ThenText9.Text = 0End IfIf Val(Text10.Text) = 0 Or Trim(Text10.Text) = "A" And Trim(Text10.Text) = "z" ThenText10.Text = 0End IfIf Val(Text11.Text) = 0 Or Trim(Text11.Text) = "A" And Trim(Text11.Text) = "z" ThenText11.Text = 0End IfIf Val(Text12.Text) = 0 Or Trim(Text12.Text) = "A" And Trim(Text12.Text) = "z" ThenText12.Text = 0End If
Text13.Text = Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text8.Text) + Val(Text9.Text) + Val(Text10.Text) + Val(Text11.Text) + Val(Text12.Text)
Command3.Enabled = TrueEnd Sub
Private Sub Form_Activate()
Dim str1(50) As String, str2 As String, str3(50) As StringDim i As Integer, j As Integer, n As Integer, t As Integer, s As Integer
Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from fee order by std_code ", cn
Combo1.Text = rs(1)Do While Not rs.EOF str1(n) = rs(1) n = n + 1 rs.MoveNextLoop
n = n - 1j = 0Do While True str2 = Trim(str1(j)) j = j + 1 i = 0 t = s Do While t <> 0 If Trim(str3(i)) = str2 Then Exit Do End If i = i + 1 t = t - 1 Loop
If t = 0 Then str3(s) = str2 s = s + 1 End If If j > n Then Exit Do End If
Loop
For i = 0 To s - 1 Combo1.AddItem (str3(i))NextCombo1.SetFocusCommand1.Enabled = False
Command3.Enabled = FalseText1.Text = Date
End Sub
Public Sub abc()'Text1.Text = rs(1)Text2.Text = rs(2)Text3.Text = rs(3)Text4.Text = rs(6)Text5.Text = rs(5)Text6.Text = rs(7)Text7.Text = rs(8)Text8.Text = rs(9)Text9.Text = rs(10)Text10.Text = rs(11)Text11.Text = rs(12)Text12.Text = rs(13)Text13.Text = rs(14)'Text14.Text = rs(16)'Text15.Text = rs(4)End Sub
FORM:- TEACHER SALARY ENTRY FORM
Dim rs As ADODB.RecordsetDim cn As ADODB.Connection
Dim rs1 As ADODB.RecordsetDim cn1 As ADODB.Connection
Dim k As Integer
Private Sub Combo1_GotFocus()'Text1.Text = ""Text2.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Command2.Enabled = FalseCommand1.Enabled = FalseEnd Sub
Private Sub DTPicker1_LostFocus()Dim Y As IntegerDim c As String, m As String, s As StringSet cn1 = New ADODB.ConnectionWith cn1 .CursorLocation = adUseClient .Provider = "msdaora"End Withcn1.Open "source=kumar; user id= amit; password=kumar;"Set rs1 = New ADODB.Recordsetrs1.Open "select * from salary ", cn1
Dim j As String, h As Integerj = Format(DTPicker2, "mmmm")
h = Format(DTPicker1, "yyyy")Do While Not rs1.EOF c = rs1("t_code") m = rs1("month") Y = rs1("year") If Trim(c) = Combo1 And Trim(m) = Trim(j) And Val(Y) = Val(h) Then MsgBox "This Teacher Take This Month Salary" DTPicker2.SetFocus End If rs1.MoveNext Loop Command2.Enabled = TrueEnd SubPrivate Sub Command1_Click()
If Val(Text8.Text) = 0 ThenText8.Text = 0End If
If Val(Text9.Text) = 0 ThenText9.Text = 0End If
If Val(Text10.Text) = 0 ThenText10.Text = 0End IfText11.Text = Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text) + Val(Text10.Text)Command4.Enabled = TrueEnd Sub
Private Sub Command2_Click()Set rs = cn.Execute("select * from teacher where t_code='" & Combo1.Text & "'")abcText5.Text = Text4.Text * 45 / 100Text6.Text = Text4.Text * 12 / 100Text7.Text = Text4.Text * 15 / 100
Text8.SetFocusCommand1.Enabled = TrueEnd Sub
Private Sub Command3_Click()Form24.HideMDIForm1.ShowCombo1.ClearText1.Text = ""Text2.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""
End Sub
Private Sub Command4_Click()'Text3.Text = DTPicker1.Month'Text12.Text = DTPicker2.Year
Dim mm As StringDim yy As Integermm = Format(DTPicker2, "mmmm")yy = Format(DTPicker1, "yyyy")
k = k + 1
Set rs1 = cn1.Execute("insert into salary values('" & Combo1 & "','" & Text1.Text & "'," & Text4.Text & "," & Text5.Text & "," & Text6.Text & "," & Text7.Text & "," & Text8.Text & "," & Text9.Text & "," & Text10.Text & "," & Text11.Text & ",'" & Text2.Text & "','" & mm & "'," & yy & ",'" & Text13.Text & "'," & k & ")")Command4.Enabled = False
Combo1.SetFocusno = "SN-" + Trim(k)
Text1.Text = ""Text2.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""
End Sub
Private Sub Form_Activate()Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from teacher", cnCombo1.Text = rs(0)Do While Not rs.EOF Combo1.AddItem rs(0) rs.MoveNextLoopText2.Text = Date
Set cn1 = New ADODB.ConnectionWith cn1 .CursorLocation = adUseClient .Provider = "msdaora"End Withcn1.Open "source=kumar; user id= amit; password=kumar;"Set rs1 = New ADODB.Recordsetrs1.Open "select * from salary order by slno", cn1
Do While Not rs1.EOF k = rs1("no") rs1.MoveNextLoopk = k + 1 Text13.Text = "SN-" + Trim(k) DTPicker1.Value = DateDTPicker2.Value = DateCommand4.Enabled = FalseCommand1.Enabled = FalseCommand2.Enabled = FalseCombo1.SetFocusEnd SubPublic Sub abc()Text1.Text = rs(1)Text4.Text = rs(10)End Sub
FORM:- ALL TEACHER SALARY ENQUIRY FORM
Dim rs As ADODB.RecordsetDim cn As ADODB.Connection
Private Sub Command2_Click()fgrid.Cols = 12fgrid.Rows = rs.RecordCount + 1fgrid.Col = 0fgrid.Row = 0fgrid.Text = "Teacher Code"fgrid.Col = 1fgrid.Text = "Name"fgrid.Col = 2
fgrid.Text = "Month"fgrid.Col = 3fgrid.Text = "Year"fgrid.Col = 4fgrid.Text = "Basci Salary"fgrid.Col = 5fgrid.Text = "D A"fgrid.Col = 6fgrid.Text = "P F"fgrid.Col = 7fgrid.Text = "H R"fgrid.Col = 8fgrid.Text = "T R"fgrid.Col = 9fgrid.Text = "C A"fgrid.Col = 10fgrid.Text = "G I"fgrid.Col = 11fgrid.Text = "Total"
Set rs = cn.Execute("select * from salary")For i = 0 To rs.RecordCount - 1fgrid.Row = i + 1fgrid.Col = 0fgrid.Text = rs(0)fgrid.Col = 1fgrid.Text = rs(1)fgrid.Col = 2fgrid.Text = rs(11)fgrid.Col = 3fgrid.Text = rs(12)fgrid.Col = 4fgrid.Text = rs(2)fgrid.Col = 5fgrid.Text = rs(3)fgrid.Col = 6fgrid.Text = rs(4)fgrid.Col = 7fgrid.Text = rs(5)fgrid.Col = 8fgrid.Text = rs(6)
fgrid.Col = 9fgrid.Text = rs(7)fgrid.Col = 10fgrid.Text = rs(8)fgrid.Col = 11fgrid.Text = rs(9)rs.MoveNext
Next
End SubPrivate Sub Form_Activate()Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from salary", cnEnd SubPrivate Sub Command3_Click()fgrid.ClearForm27.HideMDIForm1.ShowEnd Sub
FORM:- TEACHER SALARY ENQUIRY AND EDITING
Dim rs As ADODB.RecordsetDim cn As ADODB.Connection
Private Sub Combo1_GotFocus()Combo2.ClearCombo2.ClearCombo3.ClearText1.Text = ""Text4.Text = ""
Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Command2.Enabled = FalseCommand1.Enabled = FalseEnd Sub
Private Sub Combo1_LostFocus()
Dim str As String
Dim i As Integer, j As Integer, k As Integer, n As Integer, t As Integer, s As IntegerDim tr1(35) As String, tr2 As String, tr3(35) As String
Set rs = cn.Execute("select * from salary")Combo2.Text = rs("month")Do While Not rs.EOFstr = rs(0)
If Trim(Combo1.Text) = str Then tr1(n) = rs("month") n = n + 1End Ifrs.MoveNextLoop
n = n - 1j = 0Do While True tr2 = tr1(j)
j = j + 1 i = 0 t = s Do While t <> 0 If tr3(i) = tr2 Then
Exit Do End If i = i + 1 t = t - 1 Loop If t = 0 Then tr3(s) = tr2
s = s + 1 End If If j > n Then Exit Do End If
Loop
For i = 0 To s - 1 Combo2.AddItem (tr3(i))Next
End Sub
Private Sub Combo2_GotFocus()Combo3.ClearEnd Sub
Private Sub Combo2_LostFocus()
Dim str As String, str1 As String
Dim i As Integer, j As Integer, k As Integer, n As Integer, t As Integer, s As IntegerDim yr1(35) As Integer, yr2 As Integer, yr3(35) As Integer
Set rs = cn.Execute("select * from salary")Combo3.Text = rs("year")Do While Not rs.EOF
str = rs(0)str1 = rs("month") If Trim(Combo1.Text) = Trim(str) And Trim(Combo2.Text) = Trim(str1) Then yr1(n) = rs("year") n = n + 1End Ifrs.MoveNextLoop
n = n - 1j = 0Do While True yr2 = yr1(j) j = j + 1 i = 0 t = s Do While t <> 0 If yr3(i) = yr2 Then
Exit Do End If i = i + 1 t = t - 1 Loop If t = 0 Then yr3(s) = yr2
s = s + 1 End If If j > n Then Exit Do End If
Loop
For i = 0 To s - 1 Combo3.AddItem (yr3(i))Next
End Sub
Private Sub Combo3_LostFocus()Command2.Enabled = TrueCommand2.SetFocusEnd Sub
Private Sub Command1_Click()
If Val(Text8.Text) = 0 ThenText8.Text = 0End If
If Val(Text9.Text) = 0 ThenText9.Text = 0End If
If Val(Text10.Text) = 0 ThenText10.Text = 0End IfText11.Text = Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text) + Val(Text10.Text)Command4.Enabled = TrueEnd Sub
Private Sub Command2_Click()Set rs = cn.Execute("select * from salary where t_code='" & Combo1.Text & "' and month ='" & Combo2.Text & "' and year= " & Combo3.Text & "")abcText8.SetFocusCommand1.Enabled = TrueEnd Sub
Private Sub Command3_Click()
Form25.HideMDIForm1.ShowCombo1.ClearCombo2.ClearCombo3.ClearText1.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""
End Sub
Private Sub Command4_Click() Set rs = cn.Execute("update salary set tr =" & Text8.Text & ",ca=" & Text9.Text & ",gi=" & Text10.Text & ",total=" & Text11.Text & " where t_code ='" & Combo1.Text & "' and month= '" & Combo2.Text & "' and year= " & Combo3.Text & "") Command4.Enabled = False Combo1.SetFocusEnd Sub
Private Sub Form_Activate()Dim str1(50) As String, str2 As String, str3(50) As StringDim i As Integer, j As Integer, n As Integer, t As Integer, s As Integer
Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from salary order by slno", cn
Combo1.Text = rs(0)
Text3.Text = Date
Do While Not rs.EOF str1(n) = rs(0) n = n + 1 rs.MoveNextLoop
n = n - 1j = 0Do While True str2 = Trim(str1(j)) j = j + 1 i = 0 t = s Do While t <> 0 If Trim(str3(i)) = str2 Then Exit Do End If i = i + 1 t = t - 1 Loop If t = 0 Then str3(s) = str2 s = s + 1 End If If j > n Then Exit Do End If
Loop
For i = 0 To s - 1 Combo1.AddItem (str3(i))Next
Text3.Text = Date
Combo1.SetFocusCommand4.Enabled = FalseCommand1.Enabled = FalseCommand2.Enabled = FalseEnd Sub
Public Sub abc()Text1.Text = rs(1)Text4.Text = rs(2)Text5.Text = rs(3)Text6.Text = rs(4)Text7.Text = rs(5)Text8.Text = rs(6)Text9.Text = rs(7)Text10.Text = rs(8)Text11.Text = rs(9)End Sub
FORM:- PROGRESS REPORT ENTRY FORM
Dim rs As ADODB.RecordsetDim cn As ADODB.Connection
Dim rs1 As ADODB.RecordsetDim cn1 As ADODB.Connection
Private Sub Combo2_LostFocus()Dim Y As Integer, h As IntegerDim c As String, m As String, s As StringSet cn1 = New ADODB.ConnectionWith cn1 .CursorLocation = adUseClient .Provider = "msdaora"End Withcn1.Open "source=kumar; user id= amit; password=kumar;"Set rs1 = New ADODB.Recordsetrs1.Open "select * from marks ", cn1
Dim j As Stringh = Format(DTPicker1, "yyyy")
Do While Not rs1.EOF c = rs1("std_code") m = rs1("term") Y = rs1("year") If Trim(c) = Combo1 And Trim(m) = Combo2 And Val(Y) = Val(h) Then MsgBox "In This Term Marks Is Input " Combo2.SetFocus End If rs1.MoveNext Loop Command4.Enabled = TrueEnd Sub
Private Sub Command1_Click()Dim yy As Integeryy = Format(DTPicker1, "yyyy")If Val(Text22.Text) = 0 Or Trim(Text22.Text) = "A" And Trim(Text22.Text) = "z" ThenText22.Text = 0End IfSet rs1 = cn1.Execute("insert into marks values('" & Combo1 & "','" & Text1.Text & "'," & Text2.Text & ",'" & Text3.Text & "','" & Text4.Text & "'," & yy & ",'" & Combo2 & "'," & Text5.Text & "," & Text6.Text & "," & Text7.Text & "," & Text8.Text & "," & Text9.Text & "," & Text10.Text & "," & Text11.Text & "," & Text12.Text & "," & Text13.Text & "," & Text14.Text & "," & Text15.Text & "," & Text16.Text & "," & Text17.Text & "," & Text18.Text & "," & Text19.Text & "," & Text20.Text & ",'" & Text21.Text & "'," & Text22.Text & ",'" & Text23.Text & "')")Text1.Text = ""Text2.Text = ""
Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""Text13.Text = ""Text14.Text = ""Text15.Text = ""Text16.Text = ""Text17.Text = ""Text18.Text = ""Text19.Text = ""Text20.Text = ""Text21.Text = ""Text22.Text = ""Command1.Enabled = FalseEnd Sub
Private Sub Command2_Click()Form21.HideMDIForm1.Show
Combo1.ClearText1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""Text13.Text = ""
Text14.Text = ""Text15.Text = ""Text16.Text = ""Text17.Text = ""Text18.Text = ""Text19.Text = ""Text20.Text = ""Text21.Text = ""Text22.Text = ""
End Sub
Private Sub Command3_Click()Set rs = cn.Execute("select *from student where std_code='" & Combo1 & "'")abcCombo2.SetFocusEnd Sub
Private Sub Command4_Click()If Val(Text5.Text) = 0 ThenText5.Text = 0End IfIf Val(Text6.Text) = 0 ThenText6.Text = 0End IfIf Val(Text7.Text) = 0 ThenText7.Text = 0End IfIf Val(Text8.Text) = 0 ThenText8.Text = 0End IfIf Val(Text9.Text) = 0 ThenText9.Text = 0End IfIf Val(Text10.Text) = 0 ThenText10.Text = 0End IfIf Val(Text11.Text) = 0 ThenText11.Text = 0End If
If Val(Text12.Text) = 0 ThenText12.Text = 0End IfIf Val(Text13.Text) = 0 ThenText13.Text = 0End IfIf Val(Text14.Text) = 0 ThenText14.Text = 0End IfIf Val(Text15.Text) = 0 ThenText15.Text = 0End IfIf Val(Text16.Text) = 0 ThenText16.Text = 0End IfIf Val(Text17.Text) = 0 ThenText17.Text = 0End IfIf Val(Text18.Text) = 0 ThenText18.Text = 0End IfIf Val(Text19.Text) = 0 ThenText19.Text = 0End IfText20.Text = Val(Text5.Text) + Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text) + Val(Text10.Text) + Val(Text11.Text) + Val(Text12.Text) + Val(Text13.Text) + Val(Text14.Text) + Val(Text15.Text) + Val(Text16.Text) + Val(Text17.Text) + Val(Text18.Text) + Val(Text19.Text)If Val(Text20.Text) >= 540 Then Text21.Text = "1st"Else If Val(Text20.Text) >= 420 And Val(Text20.Text) < 540 Then Text21.Text = "2nd" Else If Val(Text20.Text) >= 320 And Val(Text20.Text) < 420 Then Text21.Text = "3rd" Else If Val(Text20.Text) < 320 Then
Text21.Text = "Fail" End If End If End If End If Text22.SetFocus End Sub
Private Sub Form_Activate()Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from student order by std_code ", cnCombo1.Text = rs(0)Do While Not rs.EOF Combo1.AddItem rs(0) rs.MoveNextLoop
Set cn1 = New ADODB.ConnectionWith cn1 .CursorLocation = adUseClient .Provider = "msdaora"End Withcn1.Open "source=kumar; user id= amit; password=kumar;"Set rs1 = New ADODB.Recordsetrs1.Open "select * from marks order by std_code", cn1Text23.Text = DateCommand1.Enabled = FalseCommand4.Enabled = FalseEnd SubPublic Sub abc()Text1.Text = rs(1)Text2.Text = rs(4)Text3.Text = rs(3)Text4.Text = rs(2)
End Sub
Private Sub Text22_LostFocus()Command1.Enabled = TrueEnd Sub
FORM:- PROGRESS REPORT ENQUIRY FORM
Dim rs As ADODB.RecordsetDim cn As ADODB.ConnectionPrivate Sub Command1_Click()Dim str As String, str1 As String, str2 As StringDim k As IntegerDim st_code As String, term As String
str = "1st"str1 = "2nd"str2 = "Final"fgrid.Cols = 4fgrid.Rows = 19fgrid.Col = 0fgrid.Row = 0fgrid.ColWidth(0) = 1120fgrid.Text = "Subjects"fgrid.Col = 1fgrid.ColWidth(1) = 1120fgrid.Text = "1st Terminal"fgrid.Col = 2fgrid.ColWidth(2) = 1200fgrid.Text = "2nd Terminal"fgrid.Col = 3fgrid.ColWidth(3) = 1300
fgrid.Text = "Final Terminal"
fgrid.Col = 0fgrid.Row = 1fgrid.Text = "Hindi"fgrid.Row = 2fgrid.Text = "Sanskrit"fgrid.Row = 3fgrid.Text = "English 1"fgrid.Row = 4fgrid.Text = "English 2"fgrid.Row = 5fgrid.Text = "Math 1"fgrid.Row = 6fgrid.Text = "Math 2"fgrid.Row = 7fgrid.Text = "Physich"fgrid.Row = 8fgrid.Text = "Chemistry"fgrid.Row = 9fgrid.Text = "Biology"fgrid.Row = 10fgrid.Text = "History"fgrid.Row = 11fgrid.Text = "Geograhhy"fgrid.Row = 12fgrid.Text = "Economics"fgrid.Row = 13fgrid.Text = "G.K"fgrid.Row = 14fgrid.Text = "Computer"fgrid.Row = 15fgrid.Text = "Drawing"fgrid.Row = 16fgrid.Text = "Total"fgrid.Row = 17fgrid.Text = "Rank"fgrid.Row = 18fgrid.Text = "Attendance"
Set rs = cn.Execute("select * from marks where std_code='" & Combo1.Text & "' and term='" & Trim(str) & "' and year= " & Combo2.Text & " ")
abcFor i = 0 To rs.RecordCount - 1fgrid.Col = i + 1
fgrid.Row = 1fgrid.Text = rs(7)fgrid.Row = 2fgrid.Text = rs(8)fgrid.Row = 3fgrid.Text = rs(10)fgrid.Row = 4fgrid.Text = rs(11)fgrid.Row = 5fgrid.Text = rs(13)fgrid.Row = 6fgrid.Text = rs(14)fgrid.Row = 7fgrid.Text = rs(16)fgrid.Row = 8fgrid.Text = rs(17)fgrid.Row = 9fgrid.Text = rs(18)fgrid.Row = 10fgrid.Text = rs(19)fgrid.Row = 11fgrid.Text = rs(20)fgrid.Row = 12fgrid.Text = rs(21)fgrid.Row = 13fgrid.Text = rs(12)fgrid.Row = 14fgrid.Text = rs(9)fgrid.Row = 15fgrid.Text = rs(15)fgrid.Row = 16fgrid.Text = rs(22)fgrid.Row = 17
fgrid.Text = rs(23)fgrid.Row = 18fgrid.Text = rs(24)Next
Set rs = cn.Execute("select * from marks where std_code='" & Combo1.Text & "' and term= '" & str1 & "' and term='" & Trim(str1) & "'")
For i = 0 To rs.RecordCount - 1fgrid.Col = i + 2fgrid.Row = 1fgrid.Text = rs(7)fgrid.Row = 2fgrid.Text = rs(8)fgrid.Row = 3fgrid.Text = rs(10)fgrid.Row = 4fgrid.Text = rs(11)fgrid.Row = 5fgrid.Text = rs(13)fgrid.Row = 6fgrid.Text = rs(14)fgrid.Row = 7fgrid.Text = rs(16)fgrid.Row = 8fgrid.Text = rs(17)fgrid.Row = 9fgrid.Text = rs(18)fgrid.Row = 10fgrid.Text = rs(19)fgrid.Row = 11fgrid.Text = rs(20)fgrid.Row = 12fgrid.Text = rs(21)fgrid.Row = 13fgrid.Text = rs(12)fgrid.Row = 14fgrid.Text = rs(9)fgrid.Row = 15fgrid.Text = rs(15)
fgrid.Row = 16fgrid.Text = rs(22)fgrid.Row = 17fgrid.Text = rs(23)fgrid.Row = 18fgrid.Text = rs(24)Next
Set rs = cn.Execute("select * from marks where std_code='" & Combo1.Text & "' and term='" & Trim(str2) & "'")
For i = 0 To rs.RecordCount - 1fgrid.Col = i + 3fgrid.Row = 1fgrid.Text = rs(7)fgrid.Row = 2fgrid.Text = rs(8)fgrid.Row = 3fgrid.Text = rs(10)fgrid.Row = 4fgrid.Text = rs(11)fgrid.Row = 5fgrid.Text = rs(13)fgrid.Row = 6fgrid.Text = rs(14)fgrid.Row = 7fgrid.Text = rs(16)fgrid.Row = 8fgrid.Text = rs(17)fgrid.Row = 9fgrid.Text = rs(18)fgrid.Row = 10fgrid.Text = rs(19)fgrid.Row = 11fgrid.Text = rs(20)fgrid.Row = 12
fgrid.Text = rs(21)fgrid.Row = 13fgrid.Text = rs(12)fgrid.Row = 14fgrid.Text = rs(9)fgrid.Row = 15fgrid.Text = rs(15)fgrid.Row = 16fgrid.Text = rs(22)fgrid.Row = 17fgrid.Text = rs(23)fgrid.Row = 18fgrid.Text = rs(24)Next
End Sub
Private Sub Command2_Click()Form22.HideMDIForm1.Showfgrid.ClearCombo1.ClearText1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""End Sub
Private Sub Combo1_LostFocus()
Dim str As String
Dim i As Integer, j As Integer, k As Integer, n As Integer, t As Integer, s As IntegerDim yr1(35) As Double, yr2 As Double, yr3(35) As Double
'Combo2.Clear
Set rs = cn.Execute("select * from marks") ' where std_code='" & Combo1.Text & "'")Combo2.Text = rs("year")Do While Not rs.EOFstr = rs(0)
If Trim(Combo1.Text) = str Then yr1(n) = rs("year") n = n + 1End Ifrs.MoveNextLoop
n = n - 1j = 0Do While True yr2 = yr1(j)' k = j j = j + 1 i = 0 t = s Do While t <> 0 If yr3(i) = yr2 Then
Exit Do End If i = i + 1 t = t - 1 Loop If t = 0 Then yr3(s) = yr2
s = s + 1 End If If j > n Then Exit Do End If
Loop
For i = 0 To s - 1 Combo2.AddItem (yr3(i))NextCommand1.Enabled = TrueEnd SubPrivate Sub Combo1_GotFocus()fgrid.ClearCombo2.ClearEnd Sub
Private Sub Form_Activate()
Dim str1(50) As String, str2 As String, str3(50) As StringDim i As Integer, j As Integer, n As Integer, t As Integer, s As Integer
Set cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from marks order by std_code ", cnCombo1.Text = rs(0)Combo2.Text = rs("year")
Do While Not rs.EOF str1(n) = rs(0) n = n + 1 rs.MoveNextLoop
n = n - 1j = 0Do While True str2 = Trim(str1(j))
j = j + 1 i = 0 t = s Do While t <> 0 If Trim(str3(i)) = str2 Then Exit Do End If i = i + 1 t = t - 1 Loop If t = 0 Then str3(s) = str2 s = s + 1 End If If j > n Then Exit Do End If
Loop
For i = 0 To s - 1 Combo1.AddItem (str3(i))Next
Command1.Enabled = FalseCombo1.SetFocusText5.Text = DateEnd Sub
Public Sub abc()Text1.Text = rs(1)Text2.Text = rs(2)Text3.Text = rs(3)Text4.Text = rs(4)'DTPicker1.Value = rs(5)End Sub
FORM:- PROGRESS REPORT EDITING FORM
Dim rs As ADODB.RecordsetDim cn As ADODB.Connection
Private Sub Combo1_GotFocus()Combo2.ClearCombo3.ClearEnd Sub
Private Sub Combo1_LostFocus()
Dim str As String
Dim i As Integer, j As Integer, k As Integer, n As Integer, t As Integer, s As IntegerDim tr1(35) As String, tr2 As String, tr3(35) As String
Set rs = cn.Execute("select * from marks") ' where std_code='" & Combo1.Text & "'")Combo2.Text = rs("term")Do While Not rs.EOFstr = rs(0)
If Trim(Combo1.Text) = str Then tr1(n) = rs("term") n = n + 1End Ifrs.MoveNextLoop
n = n - 1j = 0Do While True tr2 = tr1(j)
j = j + 1 i = 0 t = s Do While t <> 0 If tr3(i) = tr2 Then
Exit Do End If i = i + 1 t = t - 1 Loop If t = 0 Then tr3(s) = tr2
s = s + 1 End If If j > n Then Exit Do End If
Loop
For i = 0 To s - 1 Combo2.AddItem (tr3(i))Next
End Sub
Private Sub Combo2_LostFocus()
Dim str As String, str1 As String
Dim i As Integer, j As Integer, k As Integer, n As Integer, t As Integer, s As IntegerDim yr1(35) As Integer, yr2 As Integer, yr3(35) As Integer'Combo2.Clear
Set rs = cn.Execute("select * from marks")Combo3.Text = rs("year")Do While Not rs.EOFstr = rs(0)str1 = rs("term") If Trim(Combo1.Text) = Trim(str) And Trim(Combo2.Text) = Trim(str1) Then
yr1(n) = rs("year") n = n + 1End Ifrs.MoveNextLoop
n = n - 1j = 0Do While True yr2 = yr1(j)' k = j j = j + 1 i = 0 t = s Do While t <> 0 If yr3(i) = yr2 Then
Exit Do End If i = i + 1 t = t - 1 Loop If t = 0 Then yr3(s) = yr2
s = s + 1 End If If j > n Then Exit Do End If
LoopFor i = 0 To s - 1 Combo3.AddItem (yr3(i))NextEnd SubPrivate Sub Combo3_LostFocus()Command1.Enabled = TrueEnd SubPrivate Sub Command1_Click()
Set rs = cn.Execute("select * from marks where std_code='" & Combo1.Text & "' and term='" & Combo2.Text & "' ")abcText6.SetFocusCommand4.Enabled = TrueEnd SubPrivate Sub Command2_Click()Form23.HideMDIForm1.Show
Combo1.ClearCombo2.ClearCombo3.ClearText1.Text = ""Text2.Text = ""Text3.Text = ""Text4.Text = ""Text5.Text = ""Text6.Text = ""Text7.Text = ""Text8.Text = ""Text9.Text = ""Text10.Text = ""Text11.Text = ""Text12.Text = ""Text13.Text = ""Text14.Text = ""Text15.Text = ""Text16.Text = ""Text17.Text = ""Text18.Text = ""Text19.Text = ""Text20.Text = ""Text21.Text = ""Text22.Text = ""Text23.Text = ""
End Sub
Private Sub Command3_Click()
Set rs = cn.Execute("update marks set hinmak =" & Text6.Text & ",sanmak=" & Text7.Text & " ,compmak=" & Text8.Text & ",engmak1=" & Text9.Text & " ,engmak2=" & Text10.Text & ",gkmak=" & Text11.Text & ",matmak1=" & Text12.Text & ",matmak2=" & Text13.Text & ",dramak=" & Text14.Text & ",phymak=" & Text15.Text & ",chemak=" & Text16.Text & " ,biolmak=" & Text17.Text & ",hismak=" & Text18.Text & " , geogmak=" & Text19.Text & " ,ecomak=" & Text20.Text & ",totmak=" & Text21.Text & " ,rank = '" & Text22.Text & "' ,atan=" & Text23.Text & " where std_code ='" & Combo1.Text & "' and term='" & Combo2.Text & "' ")End SubPrivate Sub Command4_Click()If Val(Text6.Text) = 0 ThenText6.Text = 0End IfIf Val(Text7.Text) = 0 ThenText7.Text = 0End IfIf Val(Text8.Text) = 0 ThenText8.Text = 0End IfIf Val(Text9.Text) = 0 ThenText9.Text = 0End IfIf Val(Text10.Text) = 0 ThenText10.Text = 0End IfIf Val(Text11.Text) = 0 ThenText11.Text = 0End IfIf Val(Text12.Text) = 0 ThenText12.Text = 0End IfIf Val(Text13.Text) = 0 ThenText13.Text = 0End IfIf Val(Text14.Text) = 0 ThenText14.Text = 0End IfIf Val(Text15.Text) = 0 Then
Text15.Text = 0End IfIf Val(Text16.Text) = 0 ThenText16.Text = 0End IfIf Val(Text17.Text) = 0 ThenText17.Text = 0End IfIf Val(Text18.Text) = 0 ThenText18.Text = 0End IfIf Val(Text19.Text) = 0 ThenText19.Text = 0End IfIf Val(Text20.Text) = 0 ThenText20.Text = 0End IfText21.Text = Val(Text6.Text) + Val(Text7.Text) + Val(Text8.Text) + Val(Text9.Text) + Val(Text10.Text) + Val(Text11.Text) + Val(Text12.Text) + Val(Text13.Text) + Val(Text14.Text) + Val(Text15.Text) + Val(Text16.Text) + Val(Text17.Text) + Val(Text18.Text) + Val(Text19.Text) + Val(Text20.Text)If Val(Text21.Text) >= 540 Then Text22.Text = "1st"Else If Val(Text21.Text) >= 420 And Val(Text21.Text) < 540 Then Text22.Text = "2nd" Else If Val(Text21.Text) >= 320 And Val(Text21.Text) < 420 Then Text22.Text = "3rd" Else If Val(Text21.Text) < 320 Then Text22.Text = "Fail" End If End If End If End If Text23.SetFocus Command3.Enabled = True
End Sub
Private Sub Form_Activate()Dim str1(50) As String, str2 As String, str3(50) As StringDim i As Integer, j As Integer, n As Integer, t As Integer, s As IntegerSet cn = New ADODB.ConnectionWith cn .CursorLocation = adUseClient .Provider = "msdaora"End Withcn.Open "source=kumar; user id= amit; password=kumar;"Set rs = New ADODB.Recordsetrs.Open "select * from marks order by std_code ", cnCombo1.Text = rs(0)
Do While Not rs.EOF str1(n) = rs(0) n = n + 1 rs.MoveNextLoop
n = n - 1j = 0Do While True str2 = Trim(str1(j)) j = j + 1 i = 0 t = s Do While t <> 0 If Trim(str3(i)) = str2 Then Exit Do End If i = i + 1 t = t - 1 Loop If t = 0 Then str3(s) = str2 s = s + 1 End If If j > n Then
Exit Do End If
Loop
For i = 0 To s - 1 Combo1.AddItem (str3(i))Next
Combo1.SetFocusCommand1.Enabled = FalseCommand3.Enabled = FalseCommand4.Enabled = False
Text5.Text = DateEnd SubPublic Sub abc()Text1.Text = rs(1)Text2.Text = rs(4)Text3.Text = rs(3)Text4.Text = rs(2)Text6.Text = rs(7)Text7.Text = rs(8)Text8.Text = rs(9)Text9.Text = rs(10)Text10.Text = rs(11)Text11.Text = rs(12)Text12.Text = rs(13)Text13.Text = rs(14)Text14.Text = rs(15)Text15.Text = rs(16)Text16.Text = rs(17)Text17.Text = rs(18)Text18.Text = rs(19)Text19.Text = rs(20)Text20.Text = rs(21)Text21.Text = rs(22)Text22.Text = rs(23)Text23.Text = rs(24)
End Sub
OUTPUTS
A COMPLETE ANALYSIS &
DESIGN REPORT
COMPANY
CompanyPayment
Maintenance
CompanyInformation
Product Information
Customer Information
Invoice Maintenance
CompanyBilling
PRODUCT
CUSTOMER
INVOICE
COMPBILL
COMP_PAYMENT
USER
STUDENT StudentInformation
TeacherInformation
Fee detailsInformation
Teacher salaryMaintenance
Progress Report
TEACHER
FEE
SALARY
MARKS
USER
PROGRAM STRUCTURE
1. START
2. IF USER PROVIDES CORRECT PASSWORD THEN
3. OPEN MAIN (MDI) FORM
4. IF PROCESS=”STUDENT INFORMATION “ THEN
5. ACTIVATE STUDENT ENTRY FORM OR ALL
STUDENT INFORMATION OR CLASSWISE
INFORMATION OR STUDENT RECORD
MODIFICATION OR DELETION.
6. ELSE
7. IF PROCESS=”TEACHER INFORMATION” THEN
8. ACTIVATE TEACHER ENTRY FORM OR ALL
TEACHER INFORMATIONS OR TEACHER
RECORD MODIFICATION OR DELETION.
9. ELSE
10.IF PROCESS=”FEE DETAILS” THEN
11.ACTIVATE FEE ENTRY FORM OR FEE DETAILS
FORM OR ALL STUDENT FEE ENQUIRY OR FEE
ENQUIRY AND MODIFICATIONS STUDENTWISE.
12.ELSE
13.IF PROCESS=” TEACHER SALARY” THEN
14.ACTIVATE TEACHER SALARY ENTRY FORM OR
ALL TEACHER SALARY ENQUIRY FORM OR
TEACHER SALARY ENQUIRY AND MODIFICATION
FORM.
15.ELSE
16.IF PROCESS=”PROGRESS REPORT” THEN
17.ACTIVATE STUDENT PROGRESS REPORT ENTRY FORM OR
STUDENT PROGRESS REPORT MODIFICATION FORMS OR
ISSUEING PROGRESS REPORT FORM.
18.ELSE
19.MSG =” SYSTEM IDLE TIME”
20.END IF
21.END IF
22.END IF
23.END IF
24.END IF
25.END IF
26.STOP
BY
SHASHI KANT DUBEY
ENROLL No- 002319325
S/O Sri Uma Shankar Dubey
C/O Sri Arun kumar
Yarpur Rajputana
Post Box No.- 209
Tel No- 0612-2255360
Email: [email protected]