You are on page 1of 136

TABLE OF CONTENTS

CERTIFICATE .. 3 ACKNOWLEDGEMENT .. 4 INTRODUCTION TO PROJECT TITLE... 5 HARDWARE AND SOFTWARE RESOURCES 6 TOOLS DESCRIPTION 7 VALIDATION CHECKS... 10 SYSTEM CONCEPT... 11 DESIGN PLAN .. 13

DESIGN PROCESS .. 15 SYSTEM ASSESSMENT....... ....... 18 FEASIBILITY STUDIES 22 ORAGNISATION CHART. 24 CONTEXT DIAGRAM . 25 DATA FLOW DIAGRAMS 26 E-R DIAGRAMS 27 DATABASE DESIGN. . 29 FRONT END DESIGNING... 38
2

FORM DESIGNING. 39 FORM SNAPSHOTS... 114 OUTPUT REPORTS ON PRINTER. 127 SCOPE AND RECOMMENDATIONS. 129 LIMITATIONS OF THE SYSTEM. 130 BIBLIOGRAPHY ... 131

CERTIFICATE

This is to certify that

Inventory Management System embodies

the original work done by Manik Arora, Baljeet Singh, Malna Aggarwal during this project submission as a partial fulfillment of the requirement for the System Design Project of Masters of Computer Application III Semester, of the Punjab Technical University, Jalandhar, Punjab.

Mrs. Rupinder Kaur

ACKNOWLEDGEMENT

The satisfaction and euphoria that accompanies the successful completion of any task would be incomplete without mention of the people who made it possible. No work can be claimed to the sole possession of an individual. Before one gets into think of the things I would like to add a heartfelt words for the people of this endeavor in numerous ways, right from the start.

Be that as it may, we did rush in and succeeded because of support of many people who are responsible for the knowledge & experiences that I have gained during my project.

I also express my deep gratitude to my bellowed teachers Miss. for the valuable guidance, keen interest, timely suggestions and help for completing of this project.

I extend my sincere thanks to all non-teaching staffs for providing the necessary facilities.
5

I wish to express my perform sense of gratitude to my friends for their encouragement and consistent support throughout the project.

Finally, I express my thanks to my parents, who have been my strength and spirit throughout. They have sacrificed a lot for my well being and shared all joy and happiness with me.

INTRODUCTION TO PROJECT TITLE

The Inventory Control System provides a solid basis for exploring design. The application is complex enough to pose the problems of real world program development. And because PM systems are standard in almost every retail business today, the technology is familiar.

This chapter creates a scenario to explain why such a program would developed and why it was designed this way. I creator of PM application puts a great deal of thought into the design process.

Inventory Control System for Shop has been developed keeping in view the large amount of data, which is handled during following:

1)Staff
6

2)Salary 3)Attendance.

HARDWARE & SOFTWARE RESOURCES

Software Resources

Operating system Front End RDBMS Packages

Windows XP etc MICROSOFT VISUAL BASIC 6.0 Microsoft Access 2003 MS-Office etc

Hardware Resources

HARDWARE

RECOMMENDED

Hard disk Floppy Mouse RAM Processor Monitor Printer Others

40 GB of capacity 1.44 MB Serial 128 MB

Pentium- I or higher 14 inch Coloured Laser Printer, Inkjet Scanner etc.

TOOLS DESCRIPTION
8

Microsoft Visual Basic:

It is the fastest and easiest way to create applications for Microsoft Windows. Whether you are an experienced professional or brand new to Windows programming, Visual Basic provides you a complete set of tools to simplify rapid application development. So what is Visual Basic? The Visual part refers to the method used to create the graphical user interface (GUI). Rather than writing numerous lines of code to describe the appearance and location of interface elements, you simply add pre-build objects into place on screen. If youve ever used a drawing program such as Paint, you already have most of the skills necessary to create an effective user interface. The Basic part refers to the basic (Beginners All Purpose Symbolic Instruction Code), a language used by more programmers than any other language in the history of computing. Visual Basic has evolved from the original BASIC language and now contains several hundred statements, functions, and keywords, many of which relate directly to the Windows GUI. Beginners can create useful applications by learning just a few of the keywords, yet the power of the language allows professionals to accomplish anything that can be accomplished using any other Windows programming language. The Visual Basic programming language is not unique to Visual Basic. The Visual Basic programming system, Application Edition included in Microsoft Excel, Microsoft Access, and many other Windows applications uses the same language. The Visual Basic Scripting Edition (VB Script) is a widely used Scripting language and a subset of the Visual Basic Language. The investment you make in learning Visual Basic will carry over to these other areas. Whether your goal is to create a small utility for yourself or your work group, a large enterprise-wide system, or even distributed applications spanning the globe via the Internet, Visual Basic has the tools you need.

Data access features allow you to create databases, front-end applications, and scalable serverside components for most popular database formats, including Microsoft SQL Server and other enterprise-level databases. ActiveX technologies allow you to use the functionality provided by other applications, such as Microsoft Word, Word Processor, Microsoft Excel spreadsheet, and other Windows applications. You can even automate applications and objects created using the Professional or Enterprise editions of Visual Basic. Internet capabilities make it easy to provide access to documents and application, or to create Internet server applications. Your finished application is a true .exe file that uses that uses a Visual Basic Virtual Machine that you can freely distribute. Visual Basic is a powerful application development tool developed by Microsoft with the advent of the windows environment. It is used for creating customized windows based programs. Visual Basic is descendant of basic which is familiar with programming basics before switching to any other powerful language. In text based programming the programmer controls the user interface by encoding instructions but in a visual programming environment, the programmer can quickly design the user interface by drawing and arranging the screen elements. The feature helps the programmer to concentrate on developing the applications functionality rather than spending time on the repetitive programming tasks. Thus, Visual Basic is often referred to as a Rapid Application Developing (RAD) Tool.

Microsoft Access 2003:

Database management software is the key to solving the problems of information management system. Must be able to reliably manage a large amount of data in a multi-users environment so that many users can concurrently access the same data. A DBMS must able to secure from
10

unauthorized access and provide efficiency and effective solution for the major database features. Access 2003 is the most widely used database. It runs on virtually every kind of computer, from PCs and Macintoshes to mini computer and giant mainframes. A relational database management system (often called an RDBMS for short) such as Access gives you a way of doing tasks in an understandable and reasonably uncomplicated way. Access basically does the following things: Lets you enter data into it Keeps the data Lets you retrieve the data out and work with it.

Some of the important features of the Access are: 1) Large data bases and space management

Access 2003 supports the largest of databases potentially hundreds of Giga bytes in size to make efficient use of expensive hardware devices, it allows full control of space usage. 2) Many concurrent data base users

Access 2003 supports large numbers of concurrent users, executing a variety of database application operating on the same data. It minimizes data contention and guarantees data concurrency. 3) High transaction system performance.

Access 2003 maintains the preceding features with a high degree of overall processing performance.

4)

High availability
11

At same sites Access WORKS 24 HOURS PER DAY WITH NO DOWN TIME TO LIMIT database through put. Normal system operations such as database backup and partial computer system failures do not interrupt database use.

VALIDATION CHECKS

The following are procedures :Front end: Wrong entries by the user will result in the form of message box where in some case user will force to fill particular fields. Runtime error procedures are also used to trap the errors.

Back-end: Security and data back up procedure are used for data security. In some cases triggers are used to avoid any misuse of the system. Where as few columns of the all the tables will be having the properties of primary and foreign key constraints.

Data entry procedure: Methods of capturing data and entering it into the information system and finally retrieving data from the database.

Run time procedure: Procedures, which are user by end user. It should be user friendly and user should be able to carry out the next possible step. Runtime procedures are designed to handle runtime errors that may be due system errors

12

Error Message Functions: Wrong entries by user in the textboxes will generate errors, so message boxes should be displayed to help reduce the errors.

SYSTEM CONCEPT

At the heart of systems analysts is a detailed understanding of all-important facets of the business area under investigation, (for this reason, the process of acquiring this information is often termed as detailed investigation). I had worked closely with employees and managers of the organisation and they had supported me enough to answer these key questions:

What is being done? How is it being done? How frequently does it occurs? How great is the volume of transactions or decisions? How well is the task being performed? Does a Problem Exist? If a problem exists, how serious is it? If a problem exists, what is the underlying cause?
13

To answer these questions, system analysts talk to a variety of persons to gather details about the business process and their opinions of why things happen as they do and their ideas for changing the process.

14

SYSTEM CONCEPT

Before going to design a system one should know what system means to be Basically system is an integrated collection of components which satisfy functions necessary to achieve the systems goals and which have relationships to one another that give cohesion to the system and define its structure. Basically systems consists of three processes

1) Input 2) Processor 3) Output

All these processes are done by programmer, where he collects the input requirements from the user, he designs the input structure, and for obtaining output, user dont know the type of process which had gone through in the software. Conversion of input into output is called as processor. Only programmer, I only gone through the process between the process between the input and output, knows processing process.

A system concept is obtained as per the need of the user. The system concept comes in business information concept or simply information concept for the user. User gets billing information from the accounts department and accordingly fills the data.

15

DESIGN PLAN

We enjoy Programming. It's the problems-solving process that's attractive. We'd spend just enough time with Some one to learn the basics about his/her application. Then it was time to code. Not surprisingly, many assumptions turned out to be off the mark. We was disappointed to have to rework and rethink the Project.

The answer seemed to lie in spending more up front time understanding and designing the applications. Then the insight came this too, was problem solving. Designing might be just as enjoyable as coding. As I explored this, it quickly became apparent that the problems to be solved was of different kind and needed one kind of challenge; people, another.

This chapter covers the process before coding: The importance of designing an application before coding. How to assess the issues to be solved How to analyze a business system How to design an application at a high level

Comparing the Design Process in Related Fields:

Designing and constructing a building is like creating an application; the division of labor is the key. The architect creates the design for a building and represents the design in the form of a blueprint. The builder takes the blueprint and builds the structure in mortar, and wood, and brick.
16

Programmers are already good builders. The architect's work helps portray the process of design. The architect meets with a client. These meeting provide the general parameters for structure-the purpose of the building, its location, the numbers of people it will accommodate, approximate size, the resources available, and so on. With this information, the architect creates blueprint to portray a vision. Clients select a basic plan to work from. The blueprint of the chosen plan paves the way to further refine the plan in terms of precise dimension's, locations of building elements, and so on.

The final blueprint represents the full analysis of client need. From it, a complete list of building material and a schedule can be drawn up to build the structure.

Within this process, three distinct stages can be discerned; assessing the design of a client, developing a final analysis represented by a blueprint, and creating a design plan with materials and schedule. The output of one stage is used as the input for the next. Accurate information at one stage produces more accurate plans at the next.

17

DESIGN PROCESS

The process of program design in Visual Basic follows a similar subdivision of tasks. Through an interview process, a programmer assesses the needs and desires of a client and determines a feasible approach.

Then the programmer analyzes the current business process and create a high-level model. Taking that analysis, the programmer designs a high-level implementations of that system in a specific programming environment.

These stages are called system assessment, system analysis, and system design. As suggested before, the output of one stage is used as the input for the next.

This process is valuable for several reasons. It fosters open communication between the parties involved. It also provides clearly defined stages, each stage having specific goals, We've found that it provide a forward momentum to design, and allows us to better gauge time and cost investment.

Because we have integrated design into the programming process, it now takes about 30 percent of the project time. That working in Objectoriented design find that 60 percent of their time is spent in design. Much of their design effort goes into creating reusable classes.

Each stage has clearly defined goals. Each accepts input from the preceding stage and provides output to the succeeding stage.
18

As an overview, the following lists the major components of each stage.

System Assessment: Understanding the basic business system and identifying technology to achieve goals within that systems Understand the basic business system Identify issues Brainstorm solutions Select an option Describe program function Define program scope Anticipate the program's impact on the existing system. Plan program integration into the existing System Calculate the feasibility, cost, and cost- effectiveness of the program Provide a functional specification to system analysis System analysis: Modeling the systems abstractly(here, in object-oriented fashion) Identify the essential components of the system and create classes Find the attributes(including identifiers) of the classes Associates classes: Find relations between classes in class hierarchies Use class methods and properties to model the basic business flow. Use class methods and properties to model business rule Use class methods and properties to model problems situations.
19

Generates a blueprint of the business systems to determine correctness and to provide further refinement. Provide a final blueprint to system design. System Design: Translate classes and properties to table design Convert class identifiers to relational identifiers Convert classes to tables Determine a plan for referential integrity Convert object procedure to table fields. Map class methods to program modules.

Trouble Shooting:

The program design process seems complicated. Can't it be made simpler? Indeed, this is intended to be the industrial-strength process. But even for the smallest programs, we've found it helpful. The process emphasizes what to do not how to do it.

You may find that all a project takes is a 5- or 10 minute discussion, with notes on the back of an envelope and a handshake. This process is still helpful because it prompts the specific information necessary to make an informed decision.

Sometimes backtracking is necessary when information that affects the overall design become available. I simply am not 100% accurate in assessment at each stage. But the more information that is available and not gathered at an earlier stage, the more inefficiency is built into the
20

development process. Studies show that the cost of fixing design flaws increases exponentially as the development process reaches completion

As for creativity, I have found that the process helps us understand my clients' situation much better. If creativity is measured by the ability to handle a clients need with intelligence and sophistication, this process helps us achieve that goal.

SYSTEM ASSESMENT
21

22

SYSTEM ASSESMENT

System assessment begins with the first words shared with a boss or client. The analyst's job starts by gaining an understanding of that person's perspectives of the business system within which they work. The conversion takes place because there are problems or possibilities in that system as it exits. The programmer/analyst brings a background of general business knowledge and perhaps knowledge of the specific area. The major tool that the programmer brings is the ability to ask relevant questions. The process allows both parties aware of the systems needs and potential solutions to plan a specific solution. The goal of system assessment is to find a feasible solution to problems. It begins with needs and resource, develop options, and then select a promising option to explorer further. If several promising options exist, the process may be repeated. The process may also be repeated if a promising options turns out not to offer the solution desired, if it is not cost effective, if it has an undesirable effect on the existing system, or for many reasons.

Defining the scope: Whereas the functional description is the skeleton of a project(Inventory Control System), the scope is like the skin. The functional description tells the details of program operation. The scope describes what category of program this applications falls into. Both describe the program- the functional description at a low level and the scope at high level.

In the midst of detailing the functional descriptions, it's nice step back and see the forest for the trees. Often, the application being designed falls into a specific product category.
23

Naming an application is a concise way of determining the scope. The word or phrase helps in several different ways. It may be possible to buy appropriate off-the-shelf software more cost-effective than custom building. If not, the scope also shows what integration decisions may be needed.

Discouraging Scope Creep:

If the decision is made to create a custom application, the scope helps contain creep. Scope creep can occur in two ways. The Application can turn out to be more internally complex than anticipated, or the application can grow to encompass more functionality. Defining the scope- what the application doesn't do- helps limit the growth of functionality. In large projects, the scope is equivalent to the functional specification. In the absence of detailed specifications, it's important to identify at least the kind of program it is.

If this can be identified with some clarity, it provides a useful boundary. The data model usually sets that boundary. Changes that would transform the program into something different can then be flagged. Those changes are usually signaled by a sudden infusion of new data.

Planning the Integration: The Stage of system assessment brings together the previous steps in a time frame. It takes the level of effort needed to implement the new system and provides a time line that tends to be quite specific to the environment. Following are some general questions that are applicable:

For this plan to take effect, what is the sequence of actions? When will software be started, and when will different stages of completion can be reached?
24

When Should Hardware or Software be installed or upgraded? How should training be done? If data needs to be converted, when should this be done? When will the software be installed, and how long it will be tested before it becomes the primary System?

25

FEASIBILITY STUDIES

Calculating Cost, Feasibility, and Cost-Effectiveness

This last Phase of system assessment really shows the viability of the specific option. The way this is handled depends on the relationship of the Programmer/analyst to the business. If brought in from outside, he or she may be responsible for performing all these last steps and making recommendations in many other situations, the programmer is mainly responsible for coding, leaving the large questions to the power that be.

Cost Involve the tangible and the intangible. Tangible cost including programming, hardware upgrades, outside training programs, and so on. Intangible cost includes informal training, learning curve to use the program, and so on.

Cost effective means comparing costs to benefits. Usually, this is done informally ("The cost is reasonable for the anticipated benefits," "Everybody has a computerized solution, and we need one, too," and so on). More formal, methods can include a benefit analysis process.

Feasibility includes a number of issues. The basic question is: is this working solution? It may fail to meet this test for a number of reasons.

This solution may not solve the desired problems, or the solution may introduce undesired effects. There may not be resource in terms of funds or staff to make the change.
26

Passing on a Functional Description to System Analysis:

If a Plan is feasible, the functional description can be passed on to the next stage: system analysis. The functional description, taken to whatever detail is needed, provides a rough estimate of the programming effort involved.

27

ORGANISATION CHART

OWNER SECTION
ADMINISTRATOR SECTION

ACCOUNT SECTION
WORKERS SECTION

CONTEXT DIAGRAM
28

DATA FLOW DIAGRAMS


29

(For Sale, Purchase and Stock)

E-R DIAGRAM

(For Staff and Salary)


30

(For Sale and Customer Info.)

31

(For Stock And Salary)

32

DATABASE DESIGN

33

DESIGINING THE DATABASE & TABLES

Enter fields Name, types, and sizes. Enter NOT NULL on primary key fields. Enter rules on fields and rows Create indexes on primary key, foreign keys, and commonly used values. Create relations between tables.

1. Avstock Database

S_No Logical Type Field Name 1. 2. 3. 4. 5. I_Code Item_Name Price Date_of_pur Remarks N T N D/T T

Description

Item Code in Stock. Item Name in Stock. Price of an Item. Date of purchase an Item. Remarks of an Item.

2. Avstock_tmp Database

S_No Logical

Type

Description
34

Field Name 1. 2. 3. 4. 5. I_Code Item_Name Price Date_of_Pur Remarks N T N D/T T Item code in stock. Item Name in stock. Price of an Item. Date of purchase an item. Remarks of an item.

3. Cust_Payment Database

S_No Logical Type Field Name 1. 2. 3. 4. 5. 6. 7. Customer_N ame T

Description

Name of Customer. Customer Id of Customer. Date. Total Payment. Payment Given from customer. Balance of customer. Remarks of customer.

T Customer_Id D/T Date N

Total_Payme N nt N Payment_Gi T ven Balance Remarks

4. Cust_Payment_bkp Database

35

S_No Logical Type Field Name 1. 2. 3. 4. Customer_N ame Customer_Id Date Payment_Gi ven T T D/T N

Description

Customer Name. Customer Id. Date. Payment Given from Customer.

5.Enquiry Database

S_N o 1. 2. 3. 4. 5. 6. 7. 8.

Logical Field Name Contact_no Time

Type

Description

T D/T

Contact No of Enquiry. Time of Enquiry. Customer Enquiry. Address of Enquiry. Name of Enquiry. Date. Attended By Remarks of Enquiry

Customer_En T q T Address T Name D/T Date T Attended_By T Remarks

36

6.Ex_Enquiry Database

S_No Logical Field Name 1. 2. 3. 4. 5. 6. 7. 8. 9. Form_No Contact_no Time Customer_E nq Address Name Date Attended_By Remarks

Type

Description

N T T T T T D/T T T

Form No. Contact No of Ex_Enquiry. Time. Customer Enquiry. Address of Enquiry. Name of Enquiry. Date. Atteded By Remarks

7. Salary Database

S_N o 1. 2. 3. 4. 5.

Logical Field Name Emp_no E_Name Basic_Pay Allowance Advance_Pm

Type

Description

T T N N N

Employ No. Employ Name. Basic Pay of Employ. Allowance Advance Payment.
37

6. 7. 8. 9.

t Date Remarks Net_Pay Balance_Due

D/T T N N

Date. Remarks of Employ. Net Pay of Employ. Balance Due of Employ.

8. Ex_Salary Database

S_N o 1. 2. 3. 4. 5. 6. 7. 8. 9.

Logical Field Name Emp_no E_Name Basic_Pay Allowance Advance_Pm t Date Remarks Net_Pay Balance_Due

Type

Description

T T N N N D/T T N N

Employ No. Employ Name. Basic Pay of Employ. Allowance Advance Payment. Date. Remarks of Employ. Net Pay of Employ. Balance Due of Employ.

9. Lost_Item Database

38

S_N o 1. 2. 3. 4. 5.

Logical Field Name I_Code Item_Name Price Date_of_Pur Remarks

Type

Description

N T N D/T T

Item code. Item Name Price of an Item Date of purchase an item. Remark.

10. Sale Database

S_N o 1. 2. 3. 4. 5. 6. 7. 8.

Logical Field Name I_Code I_Name Items Amount Advance Balance Date Remarks

Type

Description

N T T N N N D/T T

Item code. Item Name Items Amount of an item. Advance. Balance Date Remarks

11. Sale_bkp Database

39

S_N o 1. 2. 3. 4. 5. 6. 7. 8.

Logical Field Name I_Code I_Name Items Amount Advance Balance Date Remarks

Type

Description

N T T N N N D/T T

Item code. Item Name Items Amount of an item. Advance. Balance Date Remarks

12. Staff Database

S_N o 1. 2. 3. 4. 5. 6. 7. 8.

Logical Field Name Serial_No Emp_No E_Name Parentage Address Contact_No Edu_Qual. Date_of_Join

Type

Description

N T T T T T T D/T

Serial No of an Employ. Employ No of an Employ. Employ Name of an Employ. Parentage Address of an Employ. Contact No of an Employ. Education Qualification of Employ. Date of Joining an Employ.
40

9.

Remarks

Remarks of an Employ.

13. Security Database

S_N o 1.

Logical Field Name Password

Type

Description

Password.

41

FRONT END DESIGINING

42

FORM DESIGNING

Frmsplash.frm
Private Sub Timer1_Timer() ProgressBar1.Value = ProgressBar1.Value + 10 If ProgressBar1.Value = 100 Then Load frmLogin frmLogin.Show Unload frmSplash End If End Sub

Frmlogin.frm
Option Explicit Public LoginSucceeded As Boolean Private Sub cmdCancel_Click() LoginSucceeded = False Me.Hide Unload Me End Sub

Private Sub cmdchgpwd_Click()


43

Dim oldpassword, newpassword, cmppassword As String oldpassword = InputBox("Enter Your Old Password", "Change Password") If oldpassword = adoPrimaryRS!Password Then Else MsgBox "Sorry Invalid Password", vbOKOnly, "Password" txtPassword.SetFocus Exit Sub End If newpassword = InputBox("Enter Your New Password", "Password") cmppassword = InputBox("ReEnter Your New Password", "Password") If newpassword = cmppassword Then adoPrimaryRS!Password = newpassword adoPrimaryRS.Update adoPrimaryRS.Requery MsgBox "Password Changed", vbOKOnly, "Password" Else MsgBox "Password Mismatch", vbOKOnly, "Password" End If End Sub

Private Sub cmdOK_Click() 'check for correct password


44

If txtPassword = adoPrimaryRS!Password And txtUserName = "Inventory" Then Load frmmain frmmain.Show Unload frmLogin LoginSucceeded = True Else MsgBox "Invalid UserName/Password, try again!", , "Login" txtPassword.SetFocus SendKeys "{Home}+{End}" End If
End Sub

Private Sub Form_Activate()

txtPassword.SetFocus End Sub


Private Sub Form_Load()

Call connect_db Call open_security


End Sub

Main.frm
Dim s_date, e_date Private Sub mnuirent_Click()
45

On Error GoTo e Dim s_d, e_d s_d = InputBox("Enter Starting Date", " Report") e_d = InputBox("Enter Ending Date", " Report") If s_d = "" Or e_d = "" Then MsgBox "Empty Field Error", vbOKOnly, "Help" Exit Sub End If Call connect_db adoPrimaryRS.Open "select * from Item_rent where date between #" & s_d & "#" & " and #" & e_d & "#", db, adOpenStatic, adLockOptimistic Set rptirent.DataSource = adoPrimaryRS With rptirent .Sections(3).Controls("Text1").DataField = "I_Code" .Sections(3).Controls("Text2").DataField = "Issue_to" .Sections(3).Controls("Text3").DataField = "Issue_id" .Sections(3).Controls("Text4").DataField = "Issue_date" .Sections(5).Controls("function1").DataField = "I_code" .Show End With e: MsgBox Err.Description End Sub

46

Private Sub mnuissueditms_Click() Call connect_db 'Call open_Items_rent Load frmrec frmrec.Caption = "Items Issued Window" frmrec.Label1.Caption = "Item's Issued As On Dated: " & Date frmrec.Label2.Caption = "Total Items: " & adoPrimaryRS.RecordCount Call browse frmrec.Show End Sub

Private Sub mnuissueitem_Click() Load frmissueitem frmissueitem.Show End Sub

Private Sub mnuisurtn_Click() On Error GoTo e Call connect_db Dim s_d, e_d s_d = InputBox("Enter Starting Date", " Report") e_d = InputBox("Enter Ending Date", " Report") If s_d = "" Or e_d = "" Then
47

MsgBox "Empty field error", vbOKOnly, "help" Exit Sub End If Call connect_db adoPrimaryRS.Open "select * from lib_rec where return_date between #" & s_d & "#" & " and #" & e_d & "#", db, adOpenStatic, adLockOptimistic Set rptpastitm.DataSource = adoPrimaryRS With rptpastitm .Sections(3).Controls("text1").DataField = "I_code" .Sections(3).Controls("text2").DataField = "issue_to" .Sections(3).Controls("text3").DataField = "Issue_id" .Sections(3).Controls("text4").DataField = "Issue_date" .Sections(3).Controls("text5").DataField = "return_date" .Sections(3).Controls("text6").DataField = "H_days" .Show End With e: End Sub

Private Sub mnuitmrep_Click() Call connect_db 'Call open_repmnt Set rptrepmain.DataSource = adoPrimaryRS With rptrepmain
48

.Sections(3).Controls("text1").DataField = "sno" .Sections(3).Controls("text2").DataField = "cname" .Sections(3).Controls("text3").DataField = "items" .Sections(3).Controls("text4").DataField = "amount" .Sections(3).Controls("text5").DataField = "advance" .Sections(3).Controls("text6").DataField = "balance" .Sections(3).Controls("text7").DataField = "date" .Sections(3).Controls("text8").DataField = "remarks" .Show End With End Sub

Private Sub mnuitmsale_Click() On Error GoTo e Dim s_d, e_d s_d = InputBox("Enter Starting Date", "Salary Report") e_d = InputBox("Enter Ending Date", "Salary Report") If s_d = "" Or e_d = "" Then MsgBox "Empty field error", vbOKOnly, "help" Exit Sub End If Call connect_db
49

adoPrimaryRS.Open "select * from Sale where date between #" & s_d & "#" & " and #" & e_d & "#", db, adOpenStatic, adLockOptimistic Set rptitmsale.DataSource = adoPrimaryRS With rptitmsale .Sections(3).Controls("text1").DataField = "SNo" .Sections(3).Controls("text2").DataField = "cname" .Sections(3).Controls("text3").DataField = "items" .Sections(3).Controls("text4").DataField = "amount" .Sections(3).Controls("text5").DataField = "advance" .Sections(3).Controls("text6").DataField = "balance" .Sections(3).Controls("text7").DataField = "Date" .Sections(3).Controls("text8").DataField = "Remarks" .Show End With e: MsgBox Err.Description End Sub

Private Sub mnupastmemo_Click() Call connect_db Call open_avrec Load frmrec frmrec.Caption = "Item Issued and Returned window" frmrec.Label1.Caption = "Item Issued and Returned Info."
50

frmrec.Label2.Caption = "Total Items: " & adoPrimaryRS.RecordCount Call browse frmrec.Show End Sub

Private Sub mnuRepmain_Click() Load frmrepmnt frmrepmnt.Show End Sub

Private Sub issedItems_Click() Load frmchoice frmchoice.Caption = "Issued Item Detail" frmchoice.Label3.Caption = "Issued Item Detail" frmchoice.lstcs.Clear frmchoice.lstid.Clear Call connect_db adoPrimaryRS.Open "select distinct Issue_To from Item_Rent", db, adOpenStatic, adLockOptimistic While Not adoPrimaryRS.EOF frmchoice.lstcs.AddItem adoPrimaryRS!Issue_To adoPrimaryRS.MoveNext Wend If adoPrimaryRS.EOF Or adoPrimaryRS.BOF Then
51

End If frmchoice.Show End Sub

Private Sub mnucustdataentry_Click() Load frmissued_item_Pmt frmissued_item_Pmt.Show End Sub Private Sub mnucustpmt_inf_Click() On Error GoTo e Unload frmbal_Pmt_upd Load frmch_pmt frmch_pmt.Show e: End Sub

Private Sub mnudatent_Click() Load frmenq frmenq.Show End Sub

Private Sub mnudispallI_Click() Call connect_db Call open_avstock


52

Load frmbrowse Call browse frmbrowse.Caption = "Stock Information Window" frmbrowse.Label1.Caption = "Item's in Stock" frmbrowse.lblrec.Caption = "Total Items in Stock: " & adoPrimaryRS.RecordCount frmbrowse.Show End Sub

Private Sub mnudispallLI_Click() Call connect_db Call open_lost_items Load frmbrowse Call browse frmbrowse.Caption = "Lost Items Information Window" frmbrowse.Label1.Caption = "Lost Item's " frmbrowse.lblrec.Caption = "Total Lost Items in Stock: " & adoPrimaryRS.RecordCount frmbrowse.Show End Sub

Private Sub mnudisppmt_Click() Load frmchoice frmchoice.Caption = "Issued Item Payment Taking Detail"
53

frmchoice.Label3.Caption = "Balance Checking Window" frmchoice.lstcs.Clear frmchoice.lstid.Clear Call connect_db adoPrimaryRS.Open "select * from Cust_Payment", db, adOpenStatic, adLockOptimistic While Not adoPrimaryRS.EOF frmchoice.lstcs.AddItem adoPrimaryRS!Customer_Name adoPrimaryRS.MoveNext Wend If adoPrimaryRS.EOF Or adoPrimaryRS.BOF Then End If frmchoice.Show End Sub

Private Sub mnuexit_Click() Dim ch ch = MsgBox("Are Your Sure Do You Want To Exit!!!", vbYesNo, "Exit") If ch = vbYes Then End Else frmmain.Show End If End Sub
54

Private Sub mnufinditm_Click() Load frmfind frmfind.Label1.Caption = "Library Items Find Window" frmfind.Show End Sub

Private Sub mnuiitms_Click() Call connect_db adoPrimaryRS.Open "select * from sale", db, adOpenStatic, adLockOptimistic If adoPrimaryRS.RecordCount = 0 Then MsgBox "No Issued Item Found", vbInformation + vbOKOnly, "Report" Exit Sub End If Set reportissueitems.DataSource = adoPrimaryRS With reportissueitems .Sections(3).Controls("Text1").DataField = "I_Code" .Sections(3).Controls("Text2").DataField = "C_Name" .Sections(3).Controls("Text3").DataField = "Items" .Sections(3).Controls("Text4").DataField = "Amount" .Sections(3).Controls("Text5").DataField = "Date" .Sections(5).Controls("Function1").DataField = "I_Code" .Refresh .Show
55

End With

End Sub

Private Sub mnulitms_Click() On Error GoTo e With frmupdateavstock .SSTab1.TabVisible(1) = True .SSTab1.TabVisible(0) = False Call connect_db 'Call open_stock_tmp adoPrimaryRS.MoveFirst While Not adoPrimaryRS.EOF .cboitm.AddItem adoPrimaryRS!I_code adoPrimaryRS.MoveNext Wend frmupdateavstock.Show End With e: MsgBox Err.Description End Sub Private Sub mnuabt_Click() Load frmabout frmabout.Show
56

End Sub

Private Sub mnuarrcascade_Click() frmmain.Arrange vbCascade End Sub

Private Sub mnuarrhorzintal_Click() frmmain.Arrange vbHorizontal End Sub

Private Sub mnuarricons_Click() frmmain.Arrange vbArrangeIcons End Sub

Private Sub mnuarrvertical_Click() frmmain.Arrange vbVertical End Sub

Private Sub mnubkpdb_Click() Dim sc sc = InputBox("Enter Backup Security Code", "Security Code") If sc = "backup" Then Load frmbkpchoice frmbkpchoice.Show
57

Else MsgBox "Sorry U Have no Rights to Perform Backup Operation", vbInformation + vbOKOnly, "Help" End If End Sub

Private Sub mnudispallenq_Click() Call connect_db Call open_enq Load frmbrowse With frmbrowse .Caption = "Enquiry Browse Window" .Label1.Caption = "Enquiry Browse Window" .lblrec.Caption = "Total Enquires Found: " & adoPrimaryRS.RecordCount Call browse .Show End With End Sub

Private Sub mnudispallsal_Click() Call connect_db Call open_salary Load frmbrowse With frmbrowse
58

.Caption = "Salary Browse Window" .Label1.Caption = "Salary Browse Window" .lblrec.Caption = "Total Employees: " & adoPrimaryRS.RecordCount Call browse .Show End With End Sub

Private Sub mnudispinfstaff_Click() Call connect_db Call open_staff Load frmbrowse With frmbrowse .Caption = "Staff Browse Window" .Label1.Caption = "Naval Audio/Video Staff Browse Window" .lblrec.Caption = "Total Staff: " & adoPrimaryRS.RecordCount Call browse .Show End With End Sub

Private Sub mnuenrpt_Click() s_date = InputBox("Enter Starting Date", "Enquiry Report") e_date = InputBox("Enter Ending Report", "Enquiry Report")
59

If s_date = "" Or e_date = "" Then MsgBox "Empty Fields Error", vbInformation + vbOKOnly, "Help" Exit Sub End If Call connect_db adoPrimaryRS.Open "select * from enquiry where date between #" & s_date & "#" & "and #" & e_date & "#", db, adOpenStatic, adLockOptimistic If adoPrimaryRS.RecordCount = 0 Then MsgBox "No Records Found", vbInformation + vbOKOnly, "Report" Exit Sub End If Set reportenq.DataSource = adoPrimaryRS reportenq.Sections(3).Controls("Text1").DataField = "Name" reportenq.Sections(3).Controls("Text2").DataField = "Contact_No" reportenq.Sections(3).Controls("Text4").DataField = "Address" reportenq.Sections(3).Controls("Text5").DataField = "Customer_Enq" reportenq.Sections(3).Controls("Text6").DataField = "Time" reportenq.Sections(3).Controls("Text7").DataField = "Date" reportenq.Sections(3).Controls("Text8").DataField = "Attended_By" reportenq.Sections(3).Controls("Text12").DataField = "Remarks" reportenq.Sections(5).Controls("Function1").DataField = "Date" reportenq.Refresh reportenq.Show End Sub
60

Private Sub mnuexenqinf_Click() Call connect_db Call open_exenq Load frmbrowse With frmbrowse .Caption = "Ex_Enquiry Database Browse Window" .Label1.Caption = "Ex_Enquiry Information Window" .lblrec.Caption = "Total Ex_Enquires Found: " & adoPrimaryRS.RecordCount Call browse .Show End With End Sub

Private Sub mnufee_Click() Load frmadm_fee frmadm_fee.Show End Sub Private Sub mnufindenqdetail_Click() Load frmfindenq With frmfindenq .cboopt.Enabled = False .cbocri.Enabled = False .cboopt.AddItem "="
61

.cboopt.AddItem "<>" .cbofld.AddItem "Name" .cbofld.AddItem "Parentage" .cbofld.AddItem "Address" .cbofld.AddItem "Contact_No" .cbofld.AddItem "Course_to_Join" .cbofld.AddItem "From_Whom" .cbofld.AddItem "Contact_No" .Show End With End Sub

Private Sub mnuexsalinf_Click() Call connect_db Call open_exsalary Load frmbrowse With frmbrowse .Caption = "Ex_Salary Information Window" .Label1.Caption = "Ex_Salary Browse Window" .lblrec.Caption = "Total Ex_Salary Record: " & adoPrimaryRS.RecordCount Call browse .Show End With End Sub
62

Private Sub mnuexstdsinf_Click() Call connect_db 'Call open_Exadmis Load frmbrowse With frmbrowse .Caption = "Ex Customer of Kawa Kathua" .Label1.Caption = "Ex Customer Information Window" .lblrec.Caption = "Total Customer: " & adoPrimaryRS.RecordCount Call browse .Show End With End Sub

Private Sub mnufindbooks_Click() On Error GoTo e Unload frmfind Load frmfind frmfind.Label1.Caption = "Library Books Find Window" frmfind.Show e: End Sub Private Sub mnufindenq_Click() On Error GoTo e
63

Unload frmfind Load frmfind frmfind.Label1.Caption = "Enquiry Find Window" frmfind.Show e: End Sub

Private Sub mnufindil_Click() On Error GoTo e Unload frmfind Load frmfind frmfind.Label1.Caption = "Issue Letters Find Window" frmfind.Show e: End Sub

Private Sub mnufindrl_Click() On Error GoTo e Unload frmfind Load frmfind frmfind.Label1.Caption = "Recieved Letters Find Window" frmfind.Show e:
64

End Sub

Private Sub mnufindsalary_Click() On Error GoTo e Unload frmfind Load frmfind frmfind.Label1.Caption = "Salary Find Window" frmfind.Show e: End Sub

Private Sub mnufindstaff_Click() On Error GoTo e Unload frmfind Load frmfind frmfind.Label1.Caption = "Staff Find Window" frmfind.Show e: End Sub

Private Sub mnufindstd_Click() On Error GoTo e Unload frmfind Load frmfind


65

frmfind.Label1.Caption = "Student Find Window" frmfind.Show e: End Sub Private Sub mnufinewind_Click() Call connect_db 'Call open_lib_fined Call browse frmbrowse.Label1.Caption = "Issued Books Browse Window" Load frmbrowse frmbrowse.Show End Sub

Private Sub mnuissued_returned_memo_Click() Load frmissued_returned frmissued_returned.Show End Sub Private Sub mnulostbooks_Click() Call connect_db adoPrimaryRS.Open "select * from lost_books order by Book_Code", db, adOpenStatic, adLockOptimistic If adoPrimaryRS.RecordCount = 0 Then MsgBox "No Records Found", vbInformation + vbOKOnly, "Report" Exit Sub
66

End If

Set reportlibstock.DataSource = adoPrimaryRS With reportlibstock .Sections(1).Controls("Label3").Caption = "Lost Items Report" .Sections(3).Controls("Text1").DataField = "Book_Code" .Sections(3).Controls("Text2").DataField = "B_Name" .Sections(3).Controls("Text3").DataField = "Author" .Sections(3).Controls("Text4").DataField = "Publication" .Sections(3).Controls("Text5").DataField = "Date_of_pr" .Sections(3).Controls("Text6").DataField = "Price" .Sections(3).Controls("Text7").DataField = "Purchased_From" .Sections(3).Controls("Text8").DataField = "Remarks"

.Show End With End Sub Private Sub mnulostnks_Click() Call connect_db 'Call open_lostbooks frmbrowse.Label1.Caption = "Lost Item Information" Call browse End Sub
67

Private Sub mnunbooks_Click() Call connect_db adoPrimaryRS.Open "select * from libstock order by B_Name", db, adOpenStatic, adLockOptimistic If adoPrimaryRS.RecordCount = 0 Then MsgBox "No Records Found", vbInformation + vbOKOnly, "Report" Exit Sub End If Set reportlibstock.DataSource = adoPrimaryRS With reportlibstock .Sections(3).Controls("Text1").DataField = "Book_Code" .Sections(3).Controls("Text2").DataField = "B_Name" .Sections(3).Controls("Text3").DataField = "Author" .Sections(3).Controls("Text4").DataField = "Publication" .Sections(3).Controls("Text5").DataField = "Date_of_pr" .Sections(3).Controls("Text6").DataField = "Price" .Sections(3).Controls("Text7").DataField = "Purchased_From" .Sections(3).Controls("Text8").DataField = "Remarks" .Sections(5).Controls("Function1").DataField = "Book_Code" .Show End With End Sub Private Sub mnusalaryinf_Click() Call connect_db
68

Call open_salary Load frmfindsalary With frmfindsalary .cboopt.Enabled = False .cbocri.Enabled = False .cboopt.AddItem "=" .cboopt.AddItem "<>" .cbofld.AddItem "E_Name" .cbofld.AddItem "Remarks" End With frmfindsalary.Show End Sub

Private Sub mnuir_Click() Call connect_db 'Call open_Issued_Returned Load frmbrowse Call browse frmbrowse.Caption = "Stock Information Window" frmbrowse.Label1.Caption = "Item's in Stock" frmbrowse.lblrec.Caption = "Total Items in Stock: " & adoPrimaryRS.RecordCount frmbrowse.Show End Sub
69

Private Sub mnuistk_Click() Call connect_db adoPrimaryRS.Open "select * from avstock order by Item_Name", db, adOpenStatic, adLockOptimistic If adoPrimaryRS.RecordCount = 0 Then MsgBox "No Records Found", vbInformation + vbOKOnly, "Report" Exit Sub End If Set reportlibstock.DataSource = adoPrimaryRS With reportlibstock .Sections(3).Controls("Text1").DataField = "I_Code" .Sections(3).Controls("Text2").DataField = "Item_Name" .Sections(3).Controls("Text3").DataField = "Price" .Sections(3).Controls("Text4").DataField = "Date_of_Pr" .Sections(3).Controls("Text5").DataField = "Remarks" .Sections(5).Controls("Function1").DataField = "I_Code" .Refresh .Show End With End Sub Private Sub mnuitmi_Click() Load frmissueitem frmissueitem.Show
70

End Sub

Private Sub mnuitmr_Click() Load frmreturn frmreturn.Show End Sub

Private Sub mnulostitms_Click() Call connect_db adoPrimaryRS.Open "select * from lost_items order by Item_Name", db, adOpenStatic, adLockOptimistic If adoPrimaryRS.RecordCount = 0 Then MsgBox "No Records Found", vbInformation + vbOKOnly, "Report" Exit Sub End If Set reportlibstock.DataSource = adoPrimaryRS With reportlibstock .Sections(1).Controls("Label3").Caption = "Library Lost Items Report" .Sections(3).Controls("Text1").DataField = "I_Code" .Sections(3).Controls("Text2").DataField = "Item_Name" .Sections(3).Controls("Text3").DataField = "Price" .Sections(3).Controls("Text4").DataField = "Date_of_Pr" .Sections(3).Controls("Text5").DataField = "Remarks" .Sections(5).Controls("Function1").DataField = "I_Code"
71

.Sections(5).Controls("Function2").DataField = "Price" .Refresh .Show End With End Sub

Private Sub mnupkghelp_Click() MsgBox "No Help is Attached to this S/W Check it in Full Version", vbInformation + vbOKOnly, "Help" End Sub

Private Sub mnupmtpaid_Click() Load frmchoice frmchoice.Caption = "Issued Item Payment Paid Detail" frmchoice.Label3.Caption = "Payment Paid Detail Window" frmchoice.lstcs.Clear frmchoice.lstid.Clear Call connect_db adoPrimaryRS.Open "select distinct Customer_Name from Cust_Payment_bkp", db, adOpenStatic, adLockOptimistic While Not adoPrimaryRS.EOF frmchoice.lstcs.AddItem adoPrimaryRS!Customer_Name adoPrimaryRS.MoveNext Wend
72

If adoPrimaryRS.EOF Or adoPrimaryRS.BOF Then End If frmchoice.Show End Sub

Private Sub mnusalary_Click() Call connect_db Call open_staff Load frmsalary With frmsalary While Not adoPrimaryRS.EOF .listenm.AddItem adoPrimaryRS!E_Name adoPrimaryRS.MoveNext Wend .Show End With End Sub

Private Sub mnusale_Click() Load frmsale frmsale.Show End Sub

Private Sub mnusalrep_Click()


73

s_date = InputBox("Enter Starting Date", "Salary Report") e_date = InputBox("Enter Ending Report", "Salary Report") If s_date = "" Or e_date = "" Then MsgBox "Empty Fields Error", vbInformation + vbOKOnly, "Help" Exit Sub End If Call connect_db adoPrimaryRS.Open "select * from salary where date between #" & s_date & "#" & "and #" & e_date & "#", db, adOpenStatic, adLockOptimistic If adoPrimaryRS.RecordCount = 0 Then MsgBox "No Records Found", vbInformation + vbOKOnly, "Report" Exit Sub End If Set reportsalary.DataSource = adoPrimaryRS With reportsalary .Sections(3).Controls("Text1").DataField = "Emp_No" .Sections(3).Controls("Text2").DataField = "E_Name" .Sections(3).Controls("Text3").DataField = "Basic_Pay" .Sections(3).Controls("Text4").DataField = "Allowance" .Sections(3).Controls("Text5").DataField = "Advance_Pmt" .Sections(3).Controls("Text6").DataField = "Date" .Sections(3).Controls("Text7").DataField = "Net_Pay" .Sections(3).Controls("Text8").DataField = "Balance_due" .Sections(5).Controls("Function1").DataField = "Basic_Pay"
74

.Sections(5).Controls("Function2").DataField = "Allowance" .Sections(5).Controls("Function3").DataField = "Advance_Pmt" .Sections(5).Controls("Function4").DataField = "Net_Pay" .Sections(5).Controls("Function5").DataField = "Balance_due" .Refresh .Show End With Exit Sub End Sub Private Sub mnusolditm_Click() Call connect_db Call open_Sale Load frmbrowse With frmbrowse .Caption = "Sold Item's Browse Window" .Label1.Caption = "Sold Item's Information" .lblrec.Caption = "Total Item's Sold As on Dated: " & Date & " : " & adoPrimaryRS.RecordCount Call browse .Show End With End Sub

Private Sub mnusoldpmtt_Click()


75

Load frmchoice frmchoice.Caption = "Sold Item Payment Taking Detail" frmchoice.Label3.Caption = "Payment Taking Detail" frmchoice.lstcs.Clear frmchoice.lstid.Clear Call connect_db adoPrimaryRS.Open "select distinct C_Name from Sale", db, adOpenStatic, adLockOptimistic While Not adoPrimaryRS.EOF frmchoice.lstcs.AddItem adoPrimaryRS!C_Name adoPrimaryRS.MoveNext Wend If adoPrimaryRS.EOF Or adoPrimaryRS.BOF Then End If frmchoice.Show End Sub

Private Sub mnustaf_Click() Load frmstaff frmstaff.Show End Sub

Private Sub mnustaff_all_Click() Call connect_db


76

Call open_staff If adoPrimaryRS.RecordCount = 0 Then MsgBox "No Records Found", vbInformation + vbOKOnly, "Report" Exit Sub End If

Set reportstaff_all.DataSource = adoPrimaryRS With reportstaff_all .Sections(3).Controls("Text8").DataField = "Serial_No" .Sections(3).Controls("Text12").DataField = "E_Name" .Sections(3).Controls("Text1").DataField = "Emp_No" .Sections(3).Controls("Text2").DataField = "Parentage" .Sections(3).Controls("Text3").DataField = "Address" .Sections(3).Controls("Text4").DataField = "Contact_No" .Sections(3).Controls("Text5").DataField = "Edu_Qual" .Sections(3).Controls("Text6").DataField = "Date_of_Joining" .Refresh .Show End With End Sub

Private Sub mnustaff_Click() Call connect_db Call open_staff


77

If adoPrimaryRS.RecordCount = 0 Then MsgBox "No Records Found", vbInformation + vbOKOnly, "Report" Exit Sub End If Set reportstaff.DataSource = adoPrimaryRS With reportstaff .Sections(3).Controls("Text1").DataField = "Serial_No" .Sections(3).Controls("Text2").DataField = "E_Name" .Sections(3).Controls("Text3").DataField = "Emp_No" .Sections(3).Controls("Text4").DataField = "Parentage" .Sections(3).Controls("Text5").DataField = "Address" .Sections(3).Controls("Text6").DataField = "Contact_No" .Sections(3).Controls("Text7").DataField = "Edu_Qual" .Sections(3).Controls("Text8").DataField = "Date_of_Joining" .Sections(3).Controls("Text11").DataField = "Remarks" .Sections(3).Controls("Text12").DataField = "E_Name" .Show End With End Sub

Private Sub mnustkenq_Click() Call connect_db adoPrimaryRS.Open "select Item_Name,Total from avstock_total order by Item_Name", db, adOpenStatic, adLockPessimistic
78

If adoPrimaryRS.RecordCount = 0 Then MsgBox "No Records Found", vbInformation + vbOKOnly, "Report" Exit Sub End If Set reportlibstock_total.DataSource = adoPrimaryRS With reportlibstock_total .Sections(3).Controls("Text1").DataField = "Item_Name" .Sections(3).Controls("Text3").DataField = "Total" .Sections(5).Controls("Function1").DataField = "Total" .Refresh .Show End With End Sub

Private Sub mnustockenq_Click() Call connect_db Call open_stock_total Load frmbrowse Call browse frmbrowse.Caption = "Stock Enquiry Window" frmbrowse.Label1.Caption = "Stock Enquiry Information" frmbrowse.lblrec.Caption = "Total Items in Stock: " & adoPrimaryRS.RecordCount frmbrowse.Show
79

End Sub Private Sub mnuupdatstock_Click() Load frmupdatestock frmupdatestock.Show frmupdatestock.SSTab1.TabVisible(1) = False End Sub

Frmenq.frm
Private Sub cmdupdate_Click() For X = 0 To 7 If txtFields(X).Text = "" Then MsgBox "All Fields Must be Entered", vbInformation + vbOKOnly, "Help" Exit Sub End If Next If Not IsDate(txtFields(2)) Then MsgBox "Invalid Date Entered Format", vbInformation + vbOKOnly, "Help" Exit Sub End If Call update_enq MsgBox "Enquiry Information Saved", vbInformation + vbOKOnly, "Update" Call clr txtFields(0).SetFocus
80

End Sub

Private Sub Form_Load() Call connect_db Call open_enq End Sub

Private Sub txtFields_LostFocus(Index As Integer) txtFields(5) = UCase(txtFields(5)) End Sub

Frmsalary.frm
Private Sub cmdupdate_Click() Call connect_db Call open_salary adoPrimaryRS.MoveFirst While Not adoPrimaryRS.EOF If adoPrimaryRS!Emp_No = txtFields(1) And adoPrimaryRS!Date = txtFields(4) Then MsgBox "Salary Has been Given To Employee: " & listenm.Text, vbInformation + vbOKOnly, "Help" Exit Sub End If adoPrimaryRS.MoveNext
81

Wend If txtFields(3).Text = "" Or txtFields(5).Text = "" Then txtFields(3) = 0 txtFields(5) = 0 End If For Each obj In Me If TypeOf obj Is TextBox Or TypeOf obj Is ComboBox Then If obj.Text = "" Then MsgBox "All Field Must Be Entered", vbOKOnly, "Help" Exit Sub End If End If Next If Not IsDate(txtFields(4)) Then MsgBox "Invalid Date Entered", vbInformation + vbOKOnly, "Help" Exit Sub End If Call connect_db Call open_salary Call update_salary MsgBox "Employee Salary Saved", vbInformation + vbOKOnly, "Update" End Sub

Private Sub Form_Load()


82

txtFields(4) = Date End Sub

Private Sub listenm_Click() Call connect_db Call open_staff adoPrimaryRS.MoveFirst While Not adoPrimaryRS.EOF If listenm.Text = adoPrimaryRS!E_Name Then txtFields(1) = adoPrimaryRS!Emp_No End If adoPrimaryRS.MoveNext Wend If adoPrimaryRS.EOF Or adoPrimaryRS.BOF Then adoPrimaryRS.MoveFirst End If End Sub

Private Sub txtFields_Change(Index As Integer) txtFields(7) = Val(txtFields(2)) + Val(txtFields(3)) txtFields(6) = Val(txtFields(7)) - Val(txtFields(5)) End Sub
83

Frmstaff.frm
Dim mvbookmark As Variant
Private Sub cmdupdate_Click()

Call connect_db open_staff adoPrimaryRS.MoveFirst While Not adoPrimaryRS.EOF If adoPrimaryRS!Emp_No = txtFields(1) Then MsgBox "Employee Code already Exist", vbInformation + vbOKOnly, "Help" Exit Sub End If adoPrimaryRS.MoveNext Wend For Each obj In Me If TypeOf obj Is TextBox Or TypeOf obj Is ComboBox Then If obj.Text = "" Then MsgBox "All Field Must Be Entered", vbOKOnly, "Help" Exit Sub End If End If Next If Not IsNumeric(txtFields(0)) Then MsgBox "Contact_No,Serial_No must be Numeric", vbInformation + vbOKOnly, "Help"
84

Exit Sub End If If Not IsDate(txtFields(6)) Then MsgBox "Invalid Date in Date_of_joining", vbInformation + vbOKOnly, "Help" Exit Sub End If adoPrimaryRS.AddNew Call update_staff MsgBox "New Staff Information Saved", vbInformation + vbOKOnly, "Staff" End Sub

Private Sub Form_Load() Call connect_db Call open_staff End Sub Private Sub txtFields_LostFocus(Index As Integer) txtFields(4) = UCase(txtFields(4)) txtFields(7) = UCase(txtFields(7)) End Sub

Frmsale.frm
Private Sub Combo1_Click() Combo2.Clear
85

Text2.Text = "" Text3.Text = "" Call connect_db Call open_avstock While Not adoPrimaryRS.EOF If Combo1.Text = adoPrimaryRS!Item_Name Then Combo2.AddItem adoPrimaryRS!I_code Text2.Text = adoPrimaryRS!Price End If adoPrimaryRS.MoveNext Wend Call connect_db Call open_stock_total While Not adoPrimaryRS.EOF If Combo1.Text = adoPrimaryRS!Item_Name Then Text3.Text = adoPrimaryRS!Total End If adoPrimaryRS.MoveNext Wend End Sub

Private Sub Command1_Click() For Each obj In Me If TypeOf obj Is TextBox Or TypeOf obj Is ComboBox Then
86

If obj.Text = "" Then MsgBox "All Field Must Be Entered", vbOKOnly, "Help" Exit Sub End If End If Next Call connect_db Call open_Sale While Not adoPrimaryRS.EOF If txtcname.Text = adoPrimaryRS!C_Name And txtrmk.Text = adoPrimaryRS! Remarks Then MsgBox "Record Already Exist", vbInformation + vbOKOnly, "Help" Exit Sub End If adoPrimaryRS.MoveNext Wend Call connect_db Call open_Sale With frmsale adoPrimaryRS.AddNew adoPrimaryRS!I_code = Combo2.Text adoPrimaryRS!C_Name = txtcname.Text adoPrimaryRS!items = Combo1.Text adoPrimaryRS!amount = txtamt.Text
87

adoPrimaryRS!advance = txtadv.Text adoPrimaryRS!Balance = txtbal.Text adoPrimaryRS!Date = txtdate.Text adoPrimaryRS!Remarks = txtrmk.Text adoPrimaryRS.Update MsgBox "Information Saved", vbInformation + vbOKOnly, "Help" 'Call connect_db 'Call open_avstock 'While Not adoPrimaryRS.EOF 'If Combo1.Text = adoPrimaryRS!Item_Name And Combo2.Text = adoPrimaryRS!I_code Then 'adoPrimaryRS.Delete 'End If 'adoPrimaryRS.MoveNext 'Wend End With Call clr Combo1.SetFocus End Sub

Private Sub Form_Load() Call connect_db adoPrimaryRS.Open "select distinct Item_Name from avstock", db, adOpenStatic, adLockOptimistic
88

While Not adoPrimaryRS.EOF Combo1.AddItem adoPrimaryRS!Item_Name adoPrimaryRS.MoveNext Wend End Sub

Pmt_ch.frm
Private Sub Command1_Click() If Option2 Then Load frmbal_Pmt_upd With frmbal_Pmt_upd .Caption = "Customer Sold Item Balance Updating Window" Call connect_db adoPrimaryRS.Open "select distinct C_Name from Sale", db, adOpenStatic, adLockOptimistic While Not adoPrimaryRS.EOF .Combo1.AddItem adoPrimaryRS!C_Name adoPrimaryRS.MoveNext Wend .Show End With End If Unload frmch_pmt End Sub
89

Private Sub Command2_Click() Unload Me End Sub

Frmselectcrs.frm
Private Sub cmdOK_Click() Select Case frmchoice.Caption

Case "Issued Item Payment Paid Detail": Call connect_db adoPrimaryRS.Open "select * from Cust_Payment_Bkp where Customer_Name Like '" & lstcs.Text & "'" & "and Customer_ID Like '" & lstid.Text & "'", db, adOpenStatic, adLockOptimistic If adoPrimaryRS.RecordCount = 0 Then MsgBox "Customer: " & lstcs.Text & " of ID: " & lstid.Text & " does n't Exist", vbInformation + vbOKOnly, "Help" Exit Sub End If Load frmbrowse Call browse frmbrowse.Label1.Caption = "Payment Paid by Customer(Detail Window) " & lstcs.Text frmbrowse.lblrec.Caption = "Total Records : " & adoPrimaryRS.RecordCount frmbrowse.Show Case "Issued Item Payment Taking Detail": Call connect_db
90

adoPrimaryRS.Open "select * from Cust_Payment where Customer_Name Like '" & lstcs.Text & "'" & "and Customer_ID Like '" & lstid.Text & "'", db, adOpenStatic, adLockOptimistic If adoPrimaryRS.RecordCount = 0 Then MsgBox "Customer: " & lstcs.Text & " of ID: " & lstid.Text & " does n't Exist", vbInformation + vbOKOnly, "Help" Exit Sub End If Load frmbrowse Call browse frmbrowse.Label1.Caption = "Payment Paid by Customer(Detail Window) " & lstcs.Text frmbrowse.lblrec.Caption = "Total Records : " & adoPrimaryRS.RecordCount frmbrowse.Show Case "Issued Item Detail": Call connect_db adoPrimaryRS.Open "select * from item_rent where Issue_To Like '" & lstcs.Text & "'" & "and Issue_ID Like '" & lstid.Text & "'", db, adOpenStatic, adLockOptimistic If adoPrimaryRS.RecordCount = 0 Then MsgBox "Customer: " & lstcs.Text & " of ID: " & lstid.Text & " does n't Exist", vbInformation + vbOKOnly, "Help" Exit Sub End If Load frmbrowse Call browse
91

frmbrowse.Label1.Caption = "Issued Item's Detail for Customer " & lstcs.Text frmbrowse.lblrec.Caption = "Total Issued Item's : " & adoPrimaryRS.RecordCount frmbrowse.Show

Case "Sold Item Payment Taking Detail": Call connect_db adoPrimaryRS.Open "select * from Sale where C_Name Like '" & lstcs.Text & "'" & "and Remarks Like '" & lstid.Text & "'", db, adOpenStatic, adLockOptimistic If adoPrimaryRS.RecordCount = 0 Then MsgBox "Customer: " & lstcs.Text & " of ID: " & lstid.Text & " does n't Exist", vbInformation + vbOKOnly, "Help" Exit Sub End If Load frmbrowse Call browse frmbrowse.Label1.Caption = "Sold Item's Detail for Customer " & lstcs.Text frmbrowse.lblrec.Caption = "Total Item's Sold : " & adoPrimaryRS.RecordCount frmbrowse.Show Case "Repaired Item Payment Taking Detail": Call connect_db

92

adoPrimaryRS.Open "select * from RepMain where C_Name Like '" & lstcs.Text & "'" & "and Remarks Like '" & lstid.Text & "'", db, adOpenStatic, adLockOptimistic If adoPrimaryRS.RecordCount = 0 Then MsgBox "Customer: " & lstcs.Text & " of ID: " & lstid.Text & " does n't Exist", vbInformation + vbOKOnly, "Help" Exit Sub End If Load frmbrowse Call browse frmbrowse.Label1.Caption = "Repaired Item's Detail for Customer " & lstcs.Text frmbrowse.lblrec.Caption = "Total Repaired Item's: " & adoPrimaryRS.RecordCount frmbrowse.Show End Select End Sub

Private Sub lstcs_Click() lstid.Clear Select Case frmchoice.Caption Case "Issued Item Payment Paid Detail": Call connect_db adoPrimaryRS.Open "select distinct Customer_ID,Customer_Name from Cust_Payment_bkp", db, adOpenStatic, adLockOptimistic adoPrimaryRS.MoveFirst
93

While Not adoPrimaryRS.EOF If lstcs.Text = adoPrimaryRS!Customer_Name Then lstid.AddItem adoPrimaryRS!customer_Id End If adoPrimaryRS.MoveNext Wend Case "Issued Item Payment Taking Detail": Call connect_db Call open_cust_pmt adoPrimaryRS.MoveFirst While Not adoPrimaryRS.EOF If lstcs.Text = adoPrimaryRS!Customer_Name Then lstid.AddItem adoPrimaryRS!customer_Id End If adoPrimaryRS.MoveNext Wend Case "Issued Item Detail": lstid.Clear

Case "Sold Item Payment Taking Detail": lstid.Clear Call connect_db Call open_Sale adoPrimaryRS.MoveFirst
94

While Not adoPrimaryRS.EOF If lstcs.Text = adoPrimaryRS!C_Name Then lstid.AddItem adoPrimaryRS!Remarks End If adoPrimaryRS.MoveNext Wend Case "Repaired Item Payment Taking Detail": lstid.Clear End Select End Sub

Frmfind.frm
Sub find_inf() cbofld.Clear cboopt.Clear cbocri.Clear Select Case frmfind.Label1.Caption Case "Staff Find Window": cboopt.Enabled = False cbocri.Enabled = False cboopt.AddItem "=" cboopt.AddItem "<>" cbofld.AddItem "E_Name"
95

cbofld.AddItem "Parentage" cbofld.AddItem "Address" cbofld.AddItem "Contact_No" cbofld.AddItem "Emp_No" Case "Enquiry Find Window": cboopt.Enabled = False cbocri.Enabled = False cboopt.AddItem "=" cboopt.AddItem "<>" cbofld.AddItem "Name" cbofld.AddItem "Address" cbofld.AddItem "Contact_No" cbofld.AddItem "Customer_Enq" cbofld.AddItem "Attended_By" Case "Salary Find Window": cboopt.Enabled = False cbocri.Enabled = False cboopt.AddItem "=" cboopt.AddItem "<>" cbofld.AddItem "Emp_No" cbofld.AddItem "E_Name" Case "Library Items Find Window": cboopt.Enabled = False cbocri.Enabled = False
96

cboopt.AddItem "=" cboopt.AddItem "<>" cbofld.AddItem "Item_Name" cbofld.AddItem "Remarks" End Select End Sub Private Sub cbofld_Click() cbocri.Clear cboopt.Enabled = True If cbofld.Text = "E_Name" And frmfind.Label1.Caption = "Staff Find Window" Then connect_db adoPrimaryRS.Open "select distinct E_Name from staff", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery adoPrimaryRS.MoveFirst Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!E_Name adoPrimaryRS.MoveNext Loop ElseIf cbofld.Text = "Parentage" And frmfind.Label1.Caption = "Staff Find Window" Then connect_db adoPrimaryRS.Open "select distinct Parentage from staff", db, adOpenStatic, adLockOptimistic
97

adoPrimaryRS.Requery adoPrimaryRS.MoveFirst cbocri.Clear Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!Parentage adoPrimaryRS.MoveNext Loop ElseIf cbofld.Text = "Contact_No" And frmfind.Label1.Caption = "Staff Find Window" Then connect_db adoPrimaryRS.Open "select Contact_No from staff", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery adoPrimaryRS.MoveFirst cbocri.Clear Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!Contact_No adoPrimaryRS.MoveNext Loop ElseIf cbofld.Text = "Address" And frmfind.Label1.Caption = "Staff Find Window" Then connect_db adoPrimaryRS.Open "select distinct Address from staff", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery
98

adoPrimaryRS.MoveFirst cbocri.Clear Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!Address adoPrimaryRS.MoveNext Loop ElseIf cbofld.Text = "Emp_No" And frmfind.Label1.Caption = "Staff Find Window" Then connect_db adoPrimaryRS.Open "select Emp_No from staff", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery adoPrimaryRS.MoveFirst cbocri.Clear Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!Emp_No adoPrimaryRS.MoveNext Loop ElseIf cbofld.Text = "Contact_No" And frmfind.Label1.Caption = "Enquiry Find Window" Then connect_db adoPrimaryRS.Open "select distinct Contact_No from Enquiry", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery adoPrimaryRS.MoveFirst
99

cbocri.Clear Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!Contact_No adoPrimaryRS.MoveNext Loop ElseIf cbofld.Text = "Customer_Enq" Then connect_db adoPrimaryRS.Open "select distinct Customer_Enq from enquiry", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery adoPrimaryRS.MoveFirst cbocri.Clear Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!Customer_Enq adoPrimaryRS.MoveNext Loop ElseIf cbofld.Text = "Address" And frmfind.Label1.Caption = "Enquiry Find Window" Then connect_db adoPrimaryRS.Open "select distinct Address from enquiry", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery adoPrimaryRS.MoveFirst cbocri.Clear Do While adoPrimaryRS.EOF = False
100

cbocri.AddItem adoPrimaryRS!Address adoPrimaryRS.MoveNext Loop ElseIf cbofld.Text = "Name" And frmfind.Label1.Caption = "Enquiry Find Window" Then connect_db adoPrimaryRS.Open "select distinct Name from enquiry", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery adoPrimaryRS.MoveFirst cbocri.Clear Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!Name adoPrimaryRS.MoveNext Loop ElseIf cbofld.Text = "Attended_By" Then connect_db adoPrimaryRS.Open "select distinct Attended_by from enquiry", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery adoPrimaryRS.MoveFirst cbocri.Clear Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!Attended_By adoPrimaryRS.MoveNext
101

Loop ElseIf cbofld.Text = "Emp_No" And frmfind.Label1.Caption = "Salary Find Window" Then connect_db adoPrimaryRS.Open "select distinct Emp_No from salary", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery adoPrimaryRS.MoveFirst cbocri.Clear Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!Emp_No adoPrimaryRS.MoveNext Loop ElseIf cbofld.Text = "E_Name" And frmfind.Label1.Caption = "Salary Find Window" Then connect_db adoPrimaryRS.Open "select distinct E_Name from salary", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery adoPrimaryRS.MoveFirst cbocri.Clear Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!E_Name adoPrimaryRS.MoveNext Loop
102

ElseIf cbofld.Text = "Item_Name" Then connect_db adoPrimaryRS.Open "select distinct Item_Name from avstock", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery adoPrimaryRS.MoveFirst cbocri.Clear Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!Item_Name adoPrimaryRS.MoveNext Loop ElseIf cbofld.Text = "Remarks" Then connect_db adoPrimaryRS.Open "select distinct Remarks From from avstock", db, adOpenStatic, adLockOptimistic adoPrimaryRS.Requery adoPrimaryRS.MoveFirst cbocri.Clear Do While adoPrimaryRS.EOF = False cbocri.AddItem adoPrimaryRS!Remarks adoPrimaryRS.MoveNext Loop End If End Sub
103

Private Sub cboopt_Click() cbocri.Enabled = True End Sub

Private Sub cmdque_Click() If cbofld.Text = "" Or cboopt.Text = "" Or cbocri.Text = "" Then MsgBox "Invalid Query,Field Empty Error", vbInformation + vbOKOnly, "Help" Exit Sub End If Select Case frmfind.Label1.Caption Case "Staff Find Window": connect_db adoPrimaryRS.Open "select Serial_No,Emp_No,E_Name,Contact_No,Edu_Qual,Address,Date_of_Joining,Pa rentage,Remarks from staff where " & cbofld.Text & cboopt.Text & "'" & cbocri.Text & "'" & ";", db, adOpenStatic, adLockOptimistic Load frmbrowse frmbrowse.Label1.Caption = "Staff Find Browse Window" Case "Salary Find Window": connect_db adoPrimaryRS.Open "select Emp_No,E_name,Basic_Pay,Allowance,Date,Advance_Pmt,Balance_Due,Net_ Pay,Remarks from salary where " & cbofld.Text & cboopt.Text & "'" & cbocri.Text & "'" & ";", db, adOpenStatic, adLockOptimistic Load frmbrowse
104

frmbrowse.Label1.Caption = "Salary Find Browse Window" Case "Enquiry Find Window": connect_db adoPrimaryRS.Open "select Date,Name,Address,Contact_No,Time,Customer_Enq,Attended_By,Remarks from enquiry where " & cbofld.Text & cboopt.Text & "'" & cbocri.Text & "'" & ";", db, adOpenStatic, adLockOptimistic Load frmbrowse frmbrowse.Label1.Caption = "Enquiry Find Browse Window" Case "Library Items Find Window": Call connect_db adoPrimaryRS.Open "select * from avstock where " & cbofld.Text & cboopt.Text & "'" & cbocri.Text & "'" & ";", db, adOpenStatic, adLockOptimistic Load frmbrowse End Select frmbrowse.lblrec.Caption = "Record Found: " & adoPrimaryRS.RecordCount Call browse frmbrowse.Show End Sub

Private Sub Form_Activate() find_inf End Sub

105

Private Sub Form_Load() cbocri.Enabled = False cboopt.Enabled = False

Frmbrows.frm
Dim mvbookmark As Variant
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

If mbEditFlag Or mbAddNewFlag Then Exit Sub Select Case KeyCode Case vbKeyEscape cmdclose_Click Case vbKeyEnd cmdLast_Click Case vbKeyHome cmdFirst_Click Case vbKeyUp, vbKeyPageUp If Shift = vbCtrlMask Then cmdFirst_Click Else cmdPrevious_Click End If Case vbKeyDown, vbKeyPageDown If Shift = vbCtrlMask Then cmdLast_Click
106

Else cmdNext_Click End If End Select End Sub

Private Sub Form_Load() Me.Move 0, 0 End Sub

Private Sub cmdadd_Click() On Error GoTo AddErr adoPrimaryRS.MoveLast adoPrimaryRS.AddNew grdDataGrid.SetFocus Exit Sub AddErr: MsgBox Err.Description End Sub Private Sub cmddelete_Click() On Error GoTo DeleteErr With adoPrimaryRS .Delete .MoveNext
107

If .EOF Then .MoveLast End With Exit Sub DeleteErr: MsgBox Err.Description End Sub

Private Sub cmdRefresh_Click() 'This is only needed for multi user apps On Error GoTo RefreshErr Set grdDataGrid.DataSource = Nothing adoPrimaryRS.Requery Set grdDataGrid.DataSource = adoPrimaryRS Exit Sub RefreshErr: MsgBox Err.Description End Sub

Private Sub cmdedit_Click() On Error GoTo EditErr SetButtons False Exit Sub EditErr: MsgBox Err.Description
108

End Sub

Private Sub cmdCancel_Click() On Error Resume Next SetButtons True adoPrimaryRS.CancelUpdate If mvbookmark > 0 Then adoPrimaryRS.Bookmark = mvbookmark Else adoPrimaryRS.MoveFirst End If End Sub Private Sub cmdupdate_Click() On Error GoTo UpdateErr adoPrimaryRS.UpdateBatch adAffectAll If mbAddNewFlag Then adoPrimaryRS.MoveLast End If SetButtons True Exit Sub UpdateErr: MsgBox Err.Description End Sub
109

'move to the new record

Private Sub cmdclose_Click() Unload Me End Sub Private Sub cmdFirst_Click() adoPrimaryRS.MoveFirst End Sub Private Sub cmdLast_Click() On Error GoTo GoLastError adoPrimaryRS.MoveLast Exit Sub GoLastError: MsgBox Err.Description End Sub Private Sub cmdNext_Click() On Error GoTo GoNextError If Not adoPrimaryRS.EOF Then adoPrimaryRS.MoveNext If adoPrimaryRS.EOF And adoPrimaryRS.RecordCount > 0 Then Beep 'moved off the end so go back adoPrimaryRS.MoveLast End If 'show the current record Exit Sub GoNextError:
110

MsgBox Err.Description End Sub

Private Sub cmdPrevious_Click() On Error GoTo GoPrevError If Not adoPrimaryRS.BOF Then adoPrimaryRS.MovePrevious If adoPrimaryRS.BOF And adoPrimaryRS.RecordCount > 0 Then Beep 'moved off the end so go back adoPrimaryRS.MoveFirst End If 'show the current record Exit Sub GoPrevError: MsgBox Err.Description End Sub

Private Sub SetButtons(bVal As Boolean) cmdAdd.Visible = bVal cmdEdit.Visible = bVal cmdupdate.Visible = Not bVal cmdCancel.Visible = Not bVal cmdDelete.Visible = bVal
111

cmdClose.Visible = bVal cmdRefresh.Visible = bVal cmdNext.Enabled = bVal cmdFirst.Enabled = bVal cmdLast.Enabled = bVal cmdPrevious.Enabled = bVal End Sub

Frmupdatelibstock.frm
Private Sub cboItemName_LostFocus() cboItemName.Text = UCase(cboItemName) End Sub

Private Sub cmdsave_Click() If txtIcode.Text = "" Or cboItemName.Text = "" Or txtdop.Text = "" Or txtpr.Text = "" Or txtrmk.Text = "" Then MsgBox "All Field Must Be Entered", vbOKOnly, "Help" Exit Sub End If If Not IsDate(txtdop) Then MsgBox "Invalid Purchase Date", vbInformation + vbOKOnly, "Help" Exit Sub End If
112

If Not IsNumeric(txtIcode) Or Not IsNumeric(txtpr) Then MsgBox "Item_Code & Item Price must be numeric", vbInformation + vbOKOnly, "Help" Exit Sub End If Call connect_db Call open_avstock adoPrimaryRS.MoveFirst While Not adoPrimaryRS.EOF If txtIcode.Text = adoPrimaryRS!I_code Then MsgBox "Item Code Already Assigned", vbInformation + vbOKOnly, "Help" Exit Sub End If adoPrimaryRS.MoveNext Wend adoPrimaryRS.AddNew Call save_stock Call connect_db adoPrimaryRS.Open "select distinct Item_Name from Avstock", db, adOpenStatic, adLockOptimistic cboItemName.Clear adoPrimaryRS.MoveFirst While Not adoPrimaryRS.EOF cboItemName.AddItem adoPrimaryRS!Item_Name
113

adoPrimaryRS.MoveNext Wend MsgBox "Item Stored in Stock", vbInformation + vbOKOnly, "Help" Call clr frmupdatestock.txtIcode.SetFocus Call connect_db adoPrimaryRS.Open "select distinct Item_Name from Avstock", db, adOpenStatic, adLockOptimistic cboItemName.Clear adoPrimaryRS.MoveFirst While Not adoPrimaryRS.EOF cboItemName.AddItem adoPrimaryRS!Item_Name adoPrimaryRS.MoveNext Wend End Sub

Private Sub Form_Load() On Error GoTo e Call connect_db adoPrimaryRS.Open "select distinct I_Code from avstock_tmp", db, adOpenStatic, adLockOptimistic adoPrimaryRS.MoveFirst While Not adoPrimaryRS.EOF Cboicode.AddItem adoPrimaryRS!I_code
114

adoPrimaryRS.MoveNext Wend Call connect_db adoPrimaryRS.Open "select distinct Item_Name from Avstock", db, adOpenStatic, adLockOptimistic cboItemName.Clear adoPrimaryRS.MoveFirst While Not adoPrimaryRS.EOF cboItemName.AddItem adoPrimaryRS!Item_Name adoPrimaryRS.MoveNext Wend e: End Sub Private Sub SSTab1_Click(PreviousTab As Integer) If SSTab1.TabVisible(1) = True Then Call connect_db Call open_lost_items End If If SSTab1.TabVisible(1) = True Then Call connect_db Call open_avstock End If End Sub

115

116

FORM SNAPSHOTS

Frmsplash.frm

Frmlogin.frm

117

Main.frm

Frmenq.frm
118

Frmsalary.frm
119

Frmstaff.frm

120

Frmsale.frm

121

Pmt_ch.frm

122

Frmselectcrs.frm

123

124

Frmfind.frm

125

126

Frmbrows.frm
127

Frmupdatelibstock.frm

128

About.frm

129

OUTPUT REPORTS ON PRINTER

130

131

132

SCOPE & RECOMMENDATIONS


It is unreasonable to consider a computer based information system complete or finished; the system continues to evolve throughout its life cycle, even if it is successful. Because of creative nature of the design, there remain some lapses in accurate communication between the user and the developers. So, some aspects of the system must be modified as operational experience is gained with it. As user uses the system they may develop an idea for change or enhancement.

SCOPE OF THE FUTURE APPLICATIONS System will be management support system. System will be able to solve the hectic problems of the recruitment. Automating two departments will increase the efficiency of the work. Database security.
133

Reports can be send with e-mails as an attachment on the web.

LIMITATIONS OF THE SYSTEM

Our software will not be able to produce flexible crystals reports our since it requires a lot of alterations Online communication between various offices is not possible at this moment Accounting system can be added as an extra advantage

134

BIBLIOGRAPHY

Visual Basic 6 Complete (BPB Publication) By: Denise Santoro and Gary Master Teaches Visual Basic 6 (PHI) By: Paul Sheriff Programming in Visual Basic (BPB Publications) By: P.K.Mcbride Visual Basic 6.0 Aptech Information Systems. MSCD: Visual Basic 6 Distributed Applications (Study Guide) [BPB Publication]

135

End of Project Report

136

You might also like