You are on page 1of 66

Contents & Index

Table of Contents
Contents & Index _____________________________________________________________ 1 Acknowledgement ____________________________________________________________ 1 MISSION OF CIL_____________________________________________________________ 2 PROFILE OF CCL ____________________________________________________________ 5 COMMAND AREAS __________________________________________________________ 6 AREAS OF COALFIELDS _____________________________________________________ 7 PROFILE OF THE PROJECT ___________________________________________________ 8 FLOW CHART _______________________________________________________________ 9 E-R DIAGRAM _____________________________________________________________ 12 WHY USED VISUAL BASIC 6.0? ______________________________________________ 13 SQL Server 2005 (Back end): ___________________________________________________ 17 Characteristics of a Database Management System __________________________________ 18 TABLES ___________________________________________________________________ 19 METHODOLOGY ___________________________________________________________ 21 Screen Printing ______________________________________________________________ 23 Codes______________________________________________________________________ 30 INSTALLATION PROCEDURE ________________________________________________ 63 COMMENTS AND RECOMMENDATIONS______________________________________ 64 BIBLIOGRAPHY ____________________________________________________________ 66

Acknowledgement

BCA

Enr. No.

I am feeling very gay to express that CSIST provides us a good environment, good resource and good guidance for doing our project for BCA final semester apart from I also thankful of all faculty of the CSIST who gave support to increase our capability and productivity of project during the project work.

I want to give Special thanks to Mr. Amitabh Rajan for providing good faculty and resource for my final semester project. I will never forget his good job toward to this Institution.

I also express my sincere thank to our respected Guide Mr. Shishir Kumar for providing immeasurable help during the making Project.

I also give heartiest thank to all my friends who have helped us during the project and increase our project productivity.

Lastly I am going to give great thanks to my friend and who have given directly or indirectly support me for finishing this project successful.

MISSION OF CIL

Page : [2]

BCA

Enr. No.

The mission of Coal India is to plan Quality -Coal efficiently & economically with due attention to safety, conservation and quality.
BUSINESS OBJECTIVE

To carry on business of Coal Mining Acquisition of Coal mining Production, Sale and Disposal of coal and its By-products Coal Beneficiation, manufacturing coke, by-product of coal and other business Recognition and reconstruction of Coal Mines taken over by Govt. Policy formulation and advisory functions To act as an Entrepreneur on State in respect of Coal industry To finance replacements expenditure To develop Technical know-how Exploration and prospecting To manufacture and sell Coal as a Patent fuel
MAIN FUNCTION AS LAID DOWN BY THE GOVT. OF INDIA FOR COAL INDIA

To act towards achieving corporate objectives and approve and review strategies for achievement of these objectives. To establish policies regarding long term planning, conservation, research and development, finance, recruitment, training, safety, industrial relations wages marketing, purchase and stores. To set target and monitor them. To approve budgets, determine attended cost and retention prices and evaluate performances. Page : [3]

BCA
To coordinate among the subsidiary companies. To lay down overall policy regarding coal distribution To establish board linkage to consumer at coalfields To maintain liaisons with major customers

Enr. No.

To make on behalf of subsidiaries, such purchase of plant, equipment of high unit value and /or in short supply. All import & export to be routed through CIL and To operate a common coal cadre for CIL and its subsidiaries. Under this, requirement of personnel at the level of executives would be done by CIL alone. The subsidiaries companies are responsible to deliver coal, maintain control and carry out after sales services. once the distribution and board linkage are decided. Subsidiary companies are also responsible to sell-release proceeds of coal bills. Coal India will be involved when there are inter-company problem requiring common approaches to consumer carries etc.

SUBSIDIARIES OF CIL

Page : [4]

BCA
SL no. 1. 2. 3. 4. 5. 6. 7. 8. Eastern Coalfields Ltd.(ECL) Western Coalfields Ltd(WCL) Bharat Cooking coal Ltd. (BCCL) Central Coalfields Ltd(CCL) South Eastern Coalfields Ltd.(SECL) Northern Coalfields Ltd(NCL) Mahanadi Coalfields Ltd.(MCL) Central Mine Planning & NAME OF THE COMPANY HEAD QUARTER Sancotria Nagpur Dhanbad Ranchi Bilaspur Singrauli Sambalpur Design Ranch

Enr. No.
STATE

West Bengal Maharastra Jharkhand Jharkhand Madhya Pradesh Madhya Pradesh Orrisa Jharkhand

Institute Ltd. (C.M.P.D.I)

PROFILE OF CCL

Page : [5]

BCA

Enr. No.

The history of coal mining in India through dates some 200 years it is only now that coal comes to occupy the pride and place in industrial economy of the country as the prime source of energy. With reserve of oil fast depleting world over, coals ascendancy as dependable source of energy is today firmly established. Coal India Ltd. was formed on 1st November 1975 as the first holding company for coal following nationalization of coal mines in the country and recognition of the entire coal industry under its umbrella CIL has 8 subsidiaries. Central Coalfields Ltd. The largest subsidiaries of CIL registered under companies act 1975,has on the Coal map of the country as a public sector since Oct 1956 beginning as a National Coal Development Corp. Ltd.(NCDC),then as a central division of Coal Mines Authorities Ltd.(CMAL) and finally under its present nomenclature as subsidiary of CIL. It has contributed significantly to the gowth of national coal production and development of new Coal resources.

CCL is engaged in scientific and plant exploration of Coal reserve with due regards to safety, quality and conservation to meet the national requirement of coal. At present CCL has 60 collieries user revenue production five coal wateriest, 2 non coking wateriest and a coke oven plant , besides workshop and coal handling plant spread over in Hazaribagh, Palamu, Ranchi, Bokaro, Giridih, Chatra district. Over & above coal production CCLs under other important activities are benefaction of medium cokin coal for Steel plant through its chain of coal wateriest and manufacture of soft coke of domestic kitchen.

COMMAND AREAS

Page : [6]

BCA

Enr. No.

The command area of CCL comprises of 10 coalfields, namely Giridih, East & West Bokaro, North & South Karnpura, Jayanti, Daltongang, Auranga, Hatur, Ramgarh and Kaitha. The total area of these coalfields is approximately 2700 sq. kms. Out of whish based on techno-economic consideration only 1750 sq kms is amenable to mining operations .All these coalfields are located in Chotanagpur region of Jharkhand.
COAL RESERVES

The total reserves of these coalfields (proved, indicated and inferred) are over 34 billion tons, 15 billion tons of semi-coking Varity and 19 billion tones of noncoking verity.

AREAS OF COALFIELDS
Sl.no. AREA HEADQUARTER COALFIELDS

Page : [7]

BCA
1 2 3 4 5 6 7 8 9 10 11 12 13 14 GIRIDIH DHORI BOKARO & KARGALI KATHARA HAZARIBAGH KUJU ARGADA BARKAKANA SAYAL NORTH KARNPURA PIPETWAR RAJRAPPA RAJHARA BOKARO/COALFIELDS WATERIEST GIRIDH DHORI KARGALI KATHARA GHATI KUJU SIKRA BARKAKANA SAYAL(D) DAKRA PIPETWAR RAJRAPPA RAJHARA KATHARA

Enr. No.
GIRIDH/JAYANTI EAST BOKARO EAST BOKARO EAST BOKARO WEST BOKARO WEST BOKARO SOUTH KARNPURA SOUTH KARNPURA SOUTH KARNPURA NORTH KARNPURA NORTH KARNPURA RAMGARH DALTONGANG/HUTAR EAST BOKARO

PROFILE OF THE PROJECT


SUBJECT: The Billing Process Page : [8]

BCA

Enr. No.

The SYSTEMS Dept at CCL has to fulfill several requirements so that to function properly. It has to acquire several types of Stationeries e.g. Computers, Aces, Ups etc. Some of them are purchased a dome are hired on Rental basis from other Companies/Vendors. Installation of stationeries invites the necessity of Maintenance of

the same and the SYSTEM Dept. has to sign contracts

with vendors who carry out the Maintenance job.


So due to fulfillment of different type of requirements System Dept. receives different. Type of bills e.g. Purchases bill, rental bill and Services bill in lieu of payments made to the respective vendors.

[NOTE: -- IN THIS PROJECT WE ARE CONSIDIRING ONLY THE RENTAL BILLS.]

****************************************************************************** ********

FLOW CHART

Page : [9]

STAR T

BCA

Identify the requirement

Enr. No.

If type of Requirement= SERVICE C4

N Y
If type of req= PURCHASE

Take permission from Competent Authority

N N
If type of req= RENTAL

If Accepted

Y Invite Tenders
Enter Tender Details

No choice specified STOP Rental Bill

Y
IS INSTALLATIO N?

Select Efficient Most Option N & And send NS to FM(CF)

Bill Received C1

Take permission from competent authority

Accepted?

N Y

If Accepted STOP Invite Tenders Enter tender details, Mode of payment (OTC, QTR, MONTHLY) C3 C3

Note down the DIARY NOTE Send an order to the Selected Firm. BILL Receive d C2

Y
STOP

Select the most efficient & send a NOTE-SHEET for approval to FM(CF) with terms and conditions.

Page : [10]

C2

BCA

Enr. No.
Enter Sl.no,Invice no,Company code,Item details,Quantity,unit rate & DIARY NOTE If Accepted?

N Y N
BILL Received?

Send a payment request to FM(XP-HQ) with DN Of a particular Bill STOP

Y
OTC?

N
MONTHLY

Enter Invoice no,date,M/C no & type,location,Rental period


Enter Invoice no,date,M/C no & type,location,Rental

month

N
QUARTLY?

NO CHOICE SPECIFIED

Enter Invoice no,date,M/C no & type,location,Rental quarter,Unit rate,Amount

Prepare NS With Invoice no,date,M/C no,Type,Location,Rental period & total amount for approval & send toFM(CF-HQ)
ACCEPTED?

N
Enter DN

Send a payment request to FM(XPHQ)with DN STOP C1


Enter Sl no, Item ascription quantity, Company code, Unit rate, DN

C4

ENTER the Item for Maintaianance

Page : [11]
Sent a payment request to FM(XP-HQ) with DN of a Bill. Is AC?

BCA

Enr. No.

STOP

Y N Y

Enter Sl no, Company code, Invoice no, mode of payment, Rental period, type of service (repair/replace),Parts serviced, unit rate, quantity. N

STOP

E-R DIAGRAM

#LOT No

Installation amount Years of contract Inst Date

Bill Type Company code #Lot No

Page : [12] Name


Addres

BCA

Enr. No.

Unit rate #M/c No. #Lot No.

WHY USED VISUAL BASIC 6.0?


Microsoft visual Basic 6.0 is the newest version of the popular programming language with is new features. Visual Basic is an even stronger contender in Page : [13]

BCA

Enr. No.
the enterprise, Application development area than ever before. The Visual Basic environment is Greater for creating almost any type of application can think of. We can develop robust Standalone application game and utilities in less time than it talked in other languages. We can also use active technology to create internet-enabled applications that are limited only by our imagination. 1. HLL 2. Object Oriented P/L 3. Event Base P/L 4. RAD Feature 5. IDE Feature HLL: Visual Basic is a high-level language in nature. Codes are written in General English. OBJECT ORIEANTED: - The object oriented programming refers to writing the code for each object separately. Microsoft Corporation has development software nominally to provide the multiple User interface application. Data base programming as well as window based system programming EVENT: -Events are the triggers that call on your functions. Your client side programs will note execute unless started by an event. An event could be an acting such as clicking on the button or pacing your mouse over image.

RAD Feature: Visual Basic 6.0 is one of the best tools for designing the front-end. It is a Rapid Application Development (RAD) tool providing an Integrated Development Environment (IDE). Page : [14]

BCA

Enr. No.
The best thing is that Visual Basic Object Oriented. It has got readymade objects. Each object has its own properties, determining its position, size, color and its other nature. The other important thing is that Visual Basic is Event Driven, i.e. all activities in a program are triggered by some event. Every object has its own event handling procedures. The Visual Basic system knows all about it. The programmers job is to only arrange these objects on the screen according to the need, and decide the steps top be occurred on happening a particular event. The important point here is that the programmer doesnt have to write code to trap these events. This is done by the VB system automatically. Another important feature is that at any point the whole range of events might be possible, thus the flow of execution is not fixed as in traditional programs. Since the program has not to follow a set sequences and thus can be easily instructed, suspended or abandoned. The front-end designed through VB has got features of windows like environment. Thus a user having the little knowledge of computer can operate the program developed through VB. Handling the error is one of its best features of the VB. It helps in trapping the errors and thus prevents unwanted termination of program. At every error it displays the error message telling about the cause of error.

The best feature of Visual Basic 6.0 is its package and development wizard. This wizard helps in converting the EXE program made to VB to full packaged software.

Page : [15]

BCA

Enr. No.
Visual Basic displays five windows when started it i.e.

(1) Microsoft Visual Basic Windows: The main window contains the menu bar and tool bar. Menu bar: - The menu bar is the line of text that lies across the top of the Visual
Basic Window.

(2) The Form Windows: -

The form window is the window that is

displayed when the application is executed. This window is initially blank.

(3) The Project Windows: -The

project window displays the files

associated with the project that is currently active.

(4) Properties Windows: -Properties window display the information


about the form.

(5) Tool Box: -Toolbox contains number of controls, which one can use
in the creation of the form.

IDE Feature:
Visual Basic is also Integrated Face and Environment (IDE) . so, behind the project wizard window lays the Integrated Development environment. The IDE is important part of Visual Basic. IDE is a term commonly used in programming word to describe the interface and environment to create application, It is called interface. The IDE is also commonly referred to design environment the program.
The Visual Basic IDE is made up of a number of component: -

1. Menu Bar 2. Toolbox 3. Project Explorer 4. Project Window Page : [16]

BCA
5. Toolbar 6. Form Designers 7. Object Browsers 8. Form layout Window 9. Code Editor Window

Enr. No.

SQL Server 2005 (Back end):


Data and its storage may be considered to be the heart of any information system. Data has to be up to date accurate assessable in the required form and available to one or perhaps May user at the same time. To meet this objectives data needs to be stored efficiently to avoid lengthy access time and with minimal duplication to avoid lengthy update times

Page : [17]

BCA

Enr. No.
and possibility of inconsistency and inaccuracy. This led to the introduction of database and data base management system. The data base management system can be categorized depending upon the approach.

Characteristics of a Database Management System


1. 2. 3. 4. 5. 6. It represents complex relationships between data. Keeps a tight control of data redundancy. Enforces user defined rules to ensure the integrity of table data. Ensure that data can be shared across application. Has an automatic, intelligent backup and recovery procedure for data. Has different interface via which users can manipulate data. Page : [18]

BCA

Enr. No.
Microsoft SQL Server is a Relational Database Management System (RDBMS). Its Primary query language is Transact- SQL, an implementation of the ANSI/ISO standard Structure Query Language. SQL Server is commonly used by businesses for small- to medium-sized and large enterprise database. The database software is responsible for enforcing the structure of the database including.

I. II.

Maintaining the relationships between the data in the database. Ensuring that the data is stored correctly that the rules defining

the relationships between data are not violated. III. Recovering all data to a point of no consistency in the case of a

failure.

TABLES
1.Vendor Details Sl.No. Field Name
1. 2. 3. COMP_CODE NAME ADDRESS

Data Type
Text Text Memo

Width
10 50

Description
Company code Copmany Name Company Address

Remarks
Primary Key

2.Installation Details Sl.No Field Name .

Data Type

Width

Description

Remarks

Page : [19]

BCA
1. 2. 3. 4. 5. 6. 7. 8. 9. 10. BILL_NO DATE LOT_NO YRS_OF_CONT INST_AMT INST_DATE BILL_TYPE COMP_CODE NO_OF_CONFI G NO_OF_M/C Text Short Date Text Number Number Short Date Text Text Number Number 10 mm/dd/yy 10 Integer Double mm/dd/yy 20 10 Integer Integer

Enr. No.
Invoice No Invoice Date Lot No. Primary Key Years of contract Installation amount Date of Installation Mode of Payment Company Code No of diff type of configuration Total No of machine

3.Machine Detail Table


SL.No 1. 2. 3. 4. 5. 6. Lot No. Machine No. Unit Rate Configuration Location Pay-mode Text Text Number Text Text Text 50 50 Double 50 50 50

Description
Lot No. Machine No Unit Rate Configuration Location Pay-mode Primary key

4.Supply Detail Table


SL.No 1 2 3 4 Field Name Configaration Lot No. Unit Rate No. of Machine Data Type Text Text Number Number Width 50 50 Double Long er

Description
Configaration Lot No. Unit Rate No. of Machine

Remarks Primary key Primary key

5.Bill Table
SL.No 1. 2. 3. 4. 5. 6. Field Name BILL NO. START OF PERIOD END OF PERIOD BILL AMOUNT M/C NO. LOT NO. Data Type Text Short date Short date Number Text Text Width 20 mm/dd/yy mm/dd/yy Double 20 20 Description Invoice no. Start date of per End date of per Amont Number assigned Lot no. Remarks Primary key

Page : [20]

BCA

Enr. No.

METHODOLOGY
To develop this project we have used Microsoft Visual Basic 6.0 Enterprise Edition as our Front-End tool & Microsoft access 97 Edition as our Back end tool. Visual Basic helps us to create Forms etc. Using the code the software runs. So, the user has not to bother about Microsoft access 97.The user has to work with the forms only. The software will take care of the database .The

Page : [21]

BCA

Enr. No.

database platform we have used is Microsoft Access 97.There are many advantages in Microsoft access i.e. Restore Database, Backup Data base etc. Moreover, these two tools are fully compatible to each other as both are the product of Microsoft. There are very few chances of crashing of the software. Using Visual Basic the manipulation of the data is done i.e. data of any table of the database can be accessed, retrieved and deleted. Even the data can be updated also, using several Queries. Most professional developer prefers to use to Visual Basic as their Front End tool & Microsoft Access as their Back End Tool. So, we have used the above software.

Page : [22]

BCA

Enr. No.

Screen Printing

Page : [23]

BCA

Enr. No.

COMMON FORMS
LOGIN FORM

RENTEL BILL FORM

Page : [24]

BCA

Enr. No. INSTALLATION ENTRY FORM

SUPPLY DETAILS ENTRY FORM

Page : [25]

BCA

Enr. No. MACHINE DETAILS ENTRY FORM

BILL TABLE LOOK-UP

Page : [26]

BCA

Enr. No. VENDOR REGISTRATION FORM

INSTALLATION UPDATE FORM

Page : [27]

BCA BILL ENTRY FORM

Enr. No.

REPORT MAKER FORM

Page : [28]

BCA REPORT

Enr. No.

Page : [29]

BCA

Enr. No.

Codes
MODULE LEVEL VARIABLES :-Public nomc As Integer Public lotno As String Public menuitem As Integer Public counter As Boolean Public NL As String MAIN FORM:-Private Sub DINS_Click() INSDEL.Show End Sub Private Sub DVD_Click() VDEL.Show End Sub Private Sub Form_Activate() DataEnvironment1.Connection1.Cancel End Sub Private Sub INS_Click() menuitem = 0 INSTENTRY.Show RENFORM.Enabled = False End Sub

Private Sub MD_Click() menuitem = 3 frmselect.Show RENFORM.Enabled = False End Sub Private Sub RB_Click() menuitem = 4

Page : [30]

BCA
BILLFORM.Show RENFORM.Enabled = False End Sub Private Sub RM_Click() REMOVE.Show End Sub Private Sub SD_Click() menuitem = 2 frmselect.Show RENFORM.Enabled = False End Sub Private Sub SHB_Click() SHOBILL.Show End Sub Private Sub SHI_Click() SHOINST.Show End Sub Private Sub SHMD_Click() SHOMD.Show End Sub Private Sub SHSD_Click() SHOSUP.Show End Sub Private Sub SHVD_Click() SHOWVD.Show End Sub Private Sub SM_Click() REPORT.Show End Sub Private Sub SRP_Click() DataReport1.Show

Enr. No.

Page : [31]

BCA
End Sub Private Sub UINS_Click() INST_EDIT.Show RENFORM.Enabled = False End Sub Private Sub UMD_Click() menuitem = 5 frmselect.Show RENFORM.Enabled = False End Sub Private Sub USD_Click() menuitem = 6 frmselect.Show 'SUPDT_EDIT.Show RENFORM.Enabled = False End Sub Private Sub VD_Click() menuitem = 1 FRMREG.Show FRMREG.cadd.Enabled = True FRMREG.cadd.Visible = True FRMREG.CCLR.Visible = True FRMREG.CQUIT.Enabled = True FRMREG.CQUIT.Visible = True RENFORM.Enabled = False End Sub

Enr. No.

INSTALLATION ENTRY :-Public nocfg As Integer Private Sub C2_Click() 'clear button Dim s, d As Integer If txtbillno = "" And txtbdt = "" And txtlotno = "" And txtyrscon = "" And txtinsamt = "" And txtinsdt = "" And txtnocf = "" And txtmcno = "" Then Page : [32]

BCA

Enr. No.

s = (MsgBox("No record exists", vbExclamation + vbOKOnly, "PROJECT TIP")) txtbillno.SetFocus Else d = (MsgBox("Do you want to clear the entries", vbYesNo + vbInformation, "RESPONSE REQUIRED")) If d = vbYes Then txtbillno = "" txtbdt = "" txtlotno = "" txtyrscon = "" txtinsamt = "" txtinsdt = "" txtnocf = "" txtmcno = "" txtbillno.SetFocus Else If txtbillno = "" Then txtbillno.SetFocus ElseIf txtbdt = "" Then txtbdt.SetFocus ElseIf txtlotno = "" Then txtlotno.SetFocus ElseIf txtyrscon = "" Then txtyrscon.SetFocus ElseIf txtinsamt = "" Then txtinsamt.SetFocus ElseIf txtinsdt = "" Then txtinsdt.SetFocus ElseIf txtnocf = "" Then txtnocf.SetFocus Else txtmcno.SetFocus End If End If End If If C3.Enabled = False And d = vbYes Then C3.Enabled = True End If End Sub Page : [33]

BCA

Enr. No.

Private Sub C3_Click() 'SAVE counter = 0 Dim m, s As Integer If txtbillno = "" Or txtbdt = "" Or txtlotno = "" Or txtyrscon = "" Or txtinsamt = "" Or txtinsdt = "" Or Combo1.Text = "" Or txtcc = "" Or txtnocf = "" Or txtmcno = "" Then m = (MsgBox("Blank records can't be SAVED", vbCritical + vbOKOnly, "INCOMPLETE ENTRY")) txtbillno.SetFocus Else Data1.Recordset.AddNew Data1.Recordset.Fields(0) = UCase(Trim(txtbillno)) Data1.Recordset.Fields(1) = CDate(txtbdt) Data1.Recordset.Fields(2) = UCase(Trim(txtlotno)) lotno = UCase(Trim(txtlotno)) Data1.Recordset.Fields(3) = UCase(Trim(txtyrscon)) Data1.Recordset.Fields(4) = UCase(Trim(txtinsamt)) Data1.Recordset.Fields(6) = Combo1.Text Data1.Recordset.Fields(5) = CDate(txtinsdt) Data1.Recordset.Fields(7) = UCase(Trim(txtcc.Text)) Data1.Recordset.Fields(8) = CInt(txtnocf) nocfg = CInt(txtnocf) Data1.Recordset.Fields(9) = CInt(txtmcno) Data3.Recordset.MoveFirst Data3.Recordset.Edit Data3.Recordset.Fields(0) = lotno Data3.Recordset.Update Data1.Recordset.Update s = (MsgBox("Do you want to enter configuration details in 'SUPPLY DETAILS TABLE'", vbYesNo + vbQuestion, "RESPONSE REQUIRED")) If s = vbYes Then Unload Me SUPDT.Show Else Unload Me RENFORM.Show End If End If Page : [34]

BCA
End Sub Private Sub cexit_Click() RENFORM.Show RENFORM.Enabled = True Unload Me End Sub Private Sub Form_Activate() If Data1.Recordset.BOF = False Then Data1.Recordset.MoveLast Data1.Recordset.AddNew End If txtcc.Clear If Data2.Recordset.BOF = False Then Data2.Recordset.MoveFirst End If Do While Not Data2.Recordset.EOF txtcc.AddItem (Data2.Recordset.Fields(0)) Data2.Recordset.MoveNext Loop End Sub Private Sub Form_Load() RENFORM.Enabled = False End Sub Private Sub Form_Unload(Cancel As Integer) RENFORM.Enabled = True RENFORM.SetFocus End Sub Private Sub lblreg_Click() FRMREG.Show INSTENTRY.Hide FRMREG.C1.Enabled = True FRMREG.cadd.Enabled = False FRMREG.cadd.Visible = False FRMREG.C1.Visible = True FRMREG.cexit.Enabled = True FRMREG.cexit.Visible = True

Enr. No.

Page : [35]

BCA
FRMREG.CCLR.Visible = True FRMREG.CCLR.Enabled = True End Sub

Enr. No.

Private Sub txtbdt_LostFocus() Dim F As Integer If IsDate(txtbdt) = False Then F = MsgBox("enter date in MM/DD/YY FORMAT", vbOKOnly + vbInformation, "INCORRECT ENTRY") txtbdt = "" txtbdt.SetFocus End If End Sub Private Sub txtinsdt_LostFocus() 'Dim F As Integer If IsDate(txtbdt) = False Then 'F = MsgBox("enter date in MM/DD/YY FORMAT", vbOKOnly + vbInformation, "INCORRECT ENTRY") txtbdt = "" txtbdt.SetFocus End If End Sub Private Sub txtlotno_LostFocus() Dim a As Integer If Data1.Recordset.BOF Then txtyrscon.SetFocus Else Data1.Recordset.MoveFirst Do While Not Data1.Recordset.EOF If UCase(Trim(txtlotno)) = Data1.Recordset.Fields(2) Then a = MsgBox("LOT NUMBER ALREADY EXISTS:CHANGE vbOKOnly + vbCritical, "DUPLICATE ENTRY!") txtlotno = "" txtlotno.SetFocus Data1.Recordset.MoveLast Exit Do Else Data1.Recordset.MoveNext End If

IT",

Page : [36]

BCA

Enr. No.

Loop End If End Sub Private Sub txtmcno_LostFocus() If txtmcno < txtnocf And txtmcno <> "" Then MsgBox "'Total No of Machines' must be GREATER than or EQUAL to 'No of Configuration'", vbCritical + vbOKOnly, "ERROR in Entry" txtmcno = "" txtmcno.SetFocus End If End Sub

SUPPLY DETAILS :-Dim mctotal, i As Integer Private Sub cok_Click() Dim s, m As Integer If txtconf = "" Or txturt = "" Or txtnomc = "" Then m = (MsgBox("Incomplete records can't be SAVED", vbCritical + vbOKOnly, "INCOMPLETE ENTRY")) If txtconf = "" Then txtconf.SetFocus ElseIf txturt = "" Then txturt.SetFocus Else txtnomc.SetFocus End If Else If Data1.Recordset.BOF = False Then Data1.Recordset.MoveFirst End If If i >= 1 Then Do While Not Data1.Recordset.EOF If Data1.Recordset.Fields(0) = UCase(txtconf) And Data1.Recordset.Fields(1) = lotno Then MsgBox "Duplicate entry of CONFIGURATON TYPE for this LOT no. is not permitted", vbCritical + vbOKOnly, "ERROR" txtconf = "" Page : [37]

BCA
txtconf.SetFocus Exit Sub End If Data1.Recordset.MoveNext Loop End If If Data1.Recordset.BOF = False Then Data1.Recordset.MoveLast End If Data1.Recordset.AddNew Data1.Recordset.Fields(0) = UCase(txtconf) Data1.Recordset.Fields(1) = lotno Data1.Recordset.Fields(2) = CDbl(txturt) Data1.Recordset.Fields(3) = CInt(txtnomc) mctotal = mctotal + CInt(txtnomc) Data1.Recordset.Update txtconf = "" txturt = "" txtnomc = "" txtconf.SetFocus End If i=i+1 If Data2.Recordset.BOF = False Then Data2.Recordset.MoveFirst End If Do While Not Data2.Recordset.Fields(2) = lotno Data2.Recordset.MoveNext Loop nomc = Data2.Recordset.Fields(9)

Enr. No.

If i = CInt(Data2.Recordset.Fields(8)) Then Unload Me If mctotal = nomc Then s = (MsgBox("Want to enter M/C details in MACHINE DETAILS TABLE", vbYesNo + vbQuestion, "RESPONSE REQUIRED")) If s = vbYes Then MCDT.Show Else Page : [38]

BCA

Enr. No.

RENFORM.Show RENFORM.Enabled = True End If Else MsgBox "Total no of machines for this lot must be equal to value entered in INSTALLATION ENTRY FORM", vbOKOnly + vbCritical, "ENTRY MISMATCH" SUPDT_EDIT.Show SUPDT_EDIT.Text3.Locked = False SUPDT_EDIT.Text3.BackColor = &HFFFFFF End If End If End Sub Private Sub Form_Activate() RENFORM.Enabled = False mctotal = 0 i=0 End Sub Private Sub txtconf_LostFocus() If Data1.Recordset.BOF = False Then Data1.Recordset.MoveFirst End If If i >= 1 Then Data1.Recordset.MoveFirst Do While Not Data1.Recordset.EOF If Data1.Recordset.Fields(0) = UCase(txtconf) And Data1.Recordset.Fields(1) = lotno Then MsgBox "Duplicate entry of CONFIGURATON TYPE for this LOT no. is not permitted", vbCritical + vbOKOnly, "ERROR" txtconf = "" txtconf.SetFocus End If Data1.Recordset.MoveNext Loop End If End Sub

MACHINE DETAILS :-Private Sub cexit_Click() Page : [39]

BCA
RENFORM.Show RENFORM.Enabled = True Unload Me End Sub

Enr. No.

Private Sub cok_Click() Static i As Integer If txtmcno = "" Or Combo1 = "" Or txtcloc = "" Then MsgBox "Blank records can't be saved", vbCritical + vbOKOnly, "ERROR" If txtmcno = "" Then txtmcno.SetFocus ElseIf Combo1 = "" Then Combo1.SetFocus Else txtcloc.SetFocus End If Exit Sub End If Data1.Recordset.AddNew Data1.Recordset.Fields(0) = CStr(lotno) Data1.Recordset.Fields(1) = UCase(txtmcno) Data1.Recordset.Fields(3) = UCase(CStr(Combo1.Text)) If Not Data2.Recordset.BOF Then Data2.Recordset.MoveFirst End If Do While Not Data2.Recordset.EOF If Data2.Recordset.Fields(0) = Combo1.Text And Data2.Recordset.Fields(1) = lotno Then Data1.Recordset.Fields(2) = Data2.Recordset.Fields(2) End If Data2.Recordset.MoveNext Loop Data1.Recordset.Fields(4) = CStr(txtcloc) If Data3.Recordset.BOF = False Then Data3.Recordset.MoveFirst End If Do While Not Data3.Recordset.Fields(2) = lotno Data3.Recordset.MoveNext Loop Data1.Recordset.Fields(5) = Data3.Recordset.Fields(6) Page : [40]

BCA
Data1.Recordset.Update txtmcno = "" txtcloc = "" txtmcno.SetFocus Combo1.Clear If Data2.Recordset.BOF = False Then Data2.Recordset.MoveFirst End If Do While Not Data2.Recordset.EOF Combo1.AddItem (Data2.Recordset.Fields(0)) Data2.Recordset.MoveNext Loop i=i+1 If Data3.Recordset.BOF = False Then Data3.Recordset.MoveFirst End If Do While Not Data3.Recordset.Fields(2) = lotno Data3.Recordset.MoveNext Loop nomc = CInt(Data3.Recordset.Fields(9)) If i = nomc Then Unload Me RENFORM.Show RENFORM.Enabled = True Else End If End Sub Private Sub Form_Activate() Combo1.Clear If Data2.Recordset.BOF = False Then Data2.Recordset.MoveFirst End If Do While Not Data2.Recordset.EOF Combo1.AddItem (Data2.Recordset.Fields(0)) Data2.Recordset.MoveNext Loop End Sub

Enr. No.

Page : [41]

BCA

Enr. No.

Private Sub txtmcno_LostFocus() If Data1.Recordset.BOF = False Then Data1.Recordset.MoveFirst End If Do While Not Data1.Recordset.EOF If Data1.Recordset.Fields(1) = UCase(txtmcno) Then MsgBox "DUPLICATE entry of MACHINE no.", vbCritical + vbOKOnly, "ERROR in entry" txtmcno = "" txtmcno.SetFocus End If Data1.Recordset.MoveNext Loop End Sub

VENDOR REGISTRATION :-Private Sub C1_Click() 'HYPER Ok Dim XX As Integer If txtcomcod = "" Or txtcomnm = "" Or txtcomadd = "" Then XX = MsgBox("BLANK RECORD CAN'T BE ADDED", vbOKOnly + vbCritical, "ERROR") txtcomcod.SetFocus Else Data1.Recordset.AddNew Data1.Recordset.Fields(0) = UCase(txtcomcod) Data1.Recordset.Fields(1) = txtcomnm Data1.Recordset.Fields(2) = txtcomadd Data1.Recordset.Update Unload Me INSTENTRY.Show INSTENTRY.txtcc.SetFocus End If End Sub Private Sub CADD_Click() 'MENU OPen add Dim X1 As Integer If txtcomcod = "" Or txtcomnm = "" Or txtcomadd = "" Then X1 = MsgBox("BLANK RECORD CAN'T BE ADDED", vbOKOnly + vbCritical, "ERROR") Page : [42]

BCA
txtcomcod.SetFocus Else Data1.Recordset.AddNew Data1.Recordset.Fields(0) = UCase(txtcomcod) Data1.Recordset.Fields(1) = txtcomnm Data1.Recordset.Fields(2) = txtcomadd Data1.Recordset.Update txtcomcod = "" txtcomnm = "" txtcomadd = "" txtcomcod.SetFocus End If 'INSTENTRY.Refresh End Sub

Enr. No.

Private Sub CCLR_Click() Dim a As Integer Dim b As Integer If txtcomcod = "" And txtcomnm = "" And txtcomadd = "" Then b = (MsgBox("No record exists", vbOKOnly + vbExclamation, "PROJECT TIP")) txtcomcod.SetFocus Else a = (MsgBox("DO YOU WANT TO CLEAR THE ENTRIES", vbYesNo + vbQuestion, "RESPONCE REQUIRED")) If a = vbNo Then If txtcomcod = "" Then txtcomcod.SetFocus ElseIf txtcomnm = "" Then txtcomnm.SetFocus ElseIf txtcomadd = "" Then txtcomadd.SetFocus Else CQUIT.SetFocus End If Else txtcomcod = "" txtcomadd = "" txtcomnm = "" txtcomcod.SetFocus Page : [43]

BCA
End If End If End Sub Private Sub cexit_Click() INSTENTRY.Show INSTENTRY.txtcc.SetFocus Unload Me End Sub Private Sub CQUIT_Click() RENFORM.Show RENFORM.Enabled = True Unload Me End Sub

Enr. No.

Private Sub Form_Load() RENFORM.Enabled = False End Sub Private Sub txtcomcod_LostFocus() Dim a As Integer Dim T As Integer If Data1.Recordset.BOF Then txtcomnm.SetFocus If txtcomcod <> "" And txtcomnm <> "" And txtcomadd <> "" Then INSTENTRY.txtcc.AddItem UCase(CStr(txtcomcod)) End If Else Data1.Recordset.MoveFirst Do While Not Data1.Recordset.EOF If UCase(txtcomcod) = Data1.Recordset.Fields(0) Then a = MsgBox("COMPANY CODE ALLREADY EXISTS", vbOKOnly, "DUPLICATE ENTRY!") txtcomcod = "" txtcomcod.SetFocus Exit Do Else Data1.Recordset.MoveNext End If Loop If txtcomcod <> "" And txtcomnm <> "" And txtcomadd <> "" Then Page : [44]

BCA
INSTENTRY.txtcc.AddItem UCase(CStr(txtcomcod)) End If End If End Sub

Enr. No.

BILL ENTRY :-Dim d1 As Date Dim d2 As Date Dim hr, days As Integer Dim avail As Double Dim unitrate, totamt As Double Dim mode As String Dim dt, i As Integer Dim d, h As Integer Private Sub refdate() Dim i As Integer Combo3.Clear Combo4.Clear Combo5.Clear Combo6.Clear Combo7.Clear Combo8.Clear For i = 1 To 12 Combo3.AddItem (i) Next For i = 1 To 31 Combo4.AddItem (i) Next For i = 1990 To 2099 Combo5.AddItem (i) Next For i = 1 To 12 Combo6.AddItem (i) Next For i = 1 To 31 Combo7.AddItem (i) Next Page : [45]

BCA
For i = 1990 To 2099 Combo8.AddItem (i) Next End Sub

Enr. No.

Private Sub ccal_Click() If txtbillno = "" Or Combo1 = "" Or Combo2 = "" Or Combo3 = "" Or Combo4 = "" Or Combo5 = "" Or Combo6 = "" Or Combo7 = "" Or Combo8 = "" Then MsgBox "INCOMPLETE DATA for amount calculation", vbCritical + vbOKOnly, "ERROR" If txtbillno = "" Then txtbillno.SetFocus ElseIf Combo1 = "" Then Combo1.SetFocus ElseIf Combo2 = "" Then Combo2.SetFocus ElseIf Combo3 = "" Then Combo3.SetFocus ElseIf Combo4 = "" Then Combo4.SetFocus ElseIf Combo5 = "" Then Combo5.SetFocus ElseIf Combo6 = "" Then Combo6.SetFocus ElseIf Combo7 = "" Then Combo7.SetFocus Else Combo8.SetFocus End If Exit Sub End If If Data3.Recordset.BOF = False Then Data3.Recordset.MoveFirst End If Do While Not Data3.Recordset.EOF If Data3.Recordset.Fields(0) = Combo1 And Data3.Recordset.Fields(1) = Combo2 Then unitrate = CDbl(Data3.Recordset.Fields(2)) mode = CStr(Data3.Recordset.Fields(5)) Page : [46]

BCA

Enr. No.

Exit Do End If Data3.Recordset.MoveNext Loop d1 = CDate(Combo3.Text + "/" + Combo4.Text + "/" + Mid(Combo5.Text, 3, 2)) d2 = CDate(Combo6.Text + "/" + Combo7.Text + "/" + Mid(Combo8.Text, 3, 2)) If d2 < d1 Then MsgBox "END DATE MUST BE GREATER THAN START DATE", vbCritical + vbOKOnly, "ERROR in Entry" refdate Combo3.SetFocus Exit Sub End If dt = d2 - d1 If mode = "MONTHLY" Then If dt >= 27 And dt <= 31 Then d = InputBox("Enter the no. of working days in this month : ", "TOTAL WORKING DAYS") If d <> "" Then days = CInt(d) Else days = 26 End If Label1: h = InputBox("Enter total hours not working in this month : ", "NON WORKING HOURS") If h <> "" Then hr = CInt(h) Else hr = 1 End If If hr > (days * 8) Then MsgBox "The value entered exceeds the maximum hours limit", vbCritical + vbOKOnly, "ERROR" Page : [47]

BCA
GoTo Label1 End If avail = 1 - (hr / (days * 8)) If avail < 0.95 Then txtamt = unitrate - ((unitrate / days * 8) * hr)

Enr. No.

Else txtamt = unitrate End If ElseIf mode = "QUARTERLY" Then If dt >= 89 And dt <= 92 Then For i = 1 To 3 d = InputBox("Enter the no. of working days in month " & i & ": ", "TOTAL WORKING DAYS") If d <> "" Then days = CInt(d) Else days = 26 End If Label2: h = InputBox("Enter total hours not working in this month " & i & ": ", "NON WORKING HOURS") If h <> "" Then hr = CInt(h) Else hr = 1 End If If hr > (days * 8) Then MsgBox "The value entered exceeds the maximum hours limit", vbCritical + vbOKOnly, "ERROR" GoTo Label2 End If avail = 1 - (hr / (days * 8)) If avail < 0.95 Then totamt = totamt + (unitrate - ((unitrate / days * 8) * hr)) Page : [48]

BCA
Else totamt = totamt + unitrate End If Next txtamt = totamt End If ElseIf mode = "YEARLY" Then If dt >= 364 And dt <= 366 Then For i = 1 To 12

Enr. No.

d = InputBox("Enter the no. of working days in month " & i & ": ") If d <> "" Then days = CInt(d) Else days = 26 End If Label3: h = InputBox("Enter total hours not working in this month " & i & ": ", "NON WORKING HOURS") If h <> "" Then hr = CInt(h) Else hr = 1 End If If hr > (days * 8) Then MsgBox "The value entered exceeds the maximum hours limit", vbCritical + vbOKOnly, "ERROR" GoTo Label3 End If avail = 1 - (hr / (days * 8)) If avail < 0.95 Then totamt = totamt + unitrate - ((unitrate / days * 8) * hr) Else totamt =totamt + unitrate End If Next Page : [49]

BCA

Enr. No.

MsgBox "to" + CStr(totamt) txtamt = totamt End If Exit Sub Else MsgBox "INVALID entries of date for this payment mode", vbCritical + vbOKOnly, "ERROR" Combo3.SetFocus End If End If End Sub Private Sub cexit_Click() Unload Me RENFORM.Enabled = True End Sub Private Sub cok_Click() 'save button txtamt.Locked = False If txtbillno = "" Or Combo1 = "" Or Combo2 = "" Or Combo3 = "" Or Combo4 = "" Or Combo5 = "" Or Combo6 = "" Or Combo7 = "" Or Combo8 = "" Or txtamt = "" Then MsgBox "Blank record can't be added in the database", vbCritical + vbOKOnly, "ERROR" If txtbillno = "" Then txtbillno.SetFocus ElseIf Combo1 = "" Then Combo1.SetFocus ElseIf Combo2 = "" Then Combo2.SetFocus ElseIf Combo3 = "" Then Combo3.SetFocus ElseIf Combo4 = "" Then Combo4.SetFocus ElseIf Combo5 = "" Then Combo5.SetFocus ElseIf Combo6 = "" Then Combo6.SetFocus ElseIf Combo7 = "" Then Combo7.SetFocus Page : [50]

BCA
ElseIf Combo8 = "" Then Combo8.SetFocus Else txtamt.SetFocus End If Exit Sub End If

Enr. No.

d1 = CDate(Combo3.Text + "/" + Combo4.Text + "/" + Mid(Combo5.Text, 3, 2)) d2 = CDate(Combo6.Text + "/" + Combo7.Text + "/" + Mid(Combo8.Text, 3, 2))

If d2 < d1 Then MsgBox "END DATE MUST BE GREATER THAN START DATE", vbCritical + vbOKOnly, "ERROR in Entry" BILLFORM.SetFocus refdate Exit Sub End If If Not Data1.Recordset.BOF Then Data1.Recordset.MoveFirst Do While Not Data1.Recordset.EOF If Data1.Recordset.Fields(4) = Combo2.Text And Data1.Recordset.Fields(5) = Combo1.Text Then If (d1 <= Data1.Recordset.Fields(2)) Then MsgBox "Incorrect START DATE !!! BILL FOR THIS PERIOD HAS ALREADY BEEN PREPARED", vbCritical + vbOKOnly, "ERROR IN ENTRY" refdate Exit Sub End If End If Data1.Recordset.MoveNext Loop End If If Not Data1.Recordset.BOF Then Data1.Recordset.MoveLast End If Data1.Recordset.AddNew Data1.Recordset.Fields(0) = UCase(Trim(txtbillno)) Data1.Recordset.Fields(1) = d1 Page : [51]

BCA
Data1.Recordset.Fields(2) = d2 Data1.Recordset.Fields(3) = CDbl(txtamt) Data1.Recordset.Fields(4) = UCase(Combo2.Text) Data1.Recordset.Fields(5) = UCase(Combo1.Text) Data1.Recordset.Update txtamt = "" txtbillno = "" End Sub Private Sub Combo1_LostFocus() Combo2.Clear If Data3.Recordset.BOF = False Then Data3.Recordset.MoveFirst End If Do While Not Data3.Recordset.EOF If Data3.Recordset.Fields(0) = Combo1.Text Then Combo2.AddItem (Data3.Recordset.Fields(1)) End If Data3.Recordset.MoveNext Loop End Sub Private Sub Combo3_LostFocus() If Combo3.Text = "2" Then Combo4.Clear For i = 1 To 28 Combo4.AddItem (i) Next End If End Sub Private Sub Combo6_LostFocus() If Combo6.Text = "2" Then Combo7.Clear For i = 1 To 28 Combo7.AddItem (i) Next End If End Sub Private Sub Combo8_LostFocus()

Enr. No.

Page : [52]

BCA

Enr. No.

d1 = CDate(Combo3.Text + "/" + Combo4.Text + "/" + Mid(Combo5.Text, 3, 2)) d2 = CDate(Combo6.Text + "/" + Combo7.Text + "/" + Mid(Combo8.Text, 3, 2)) If d2 < d1 Then MsgBox "END DATE MUST BE GREATER THAN START DATE", vbCritical + vbOKOnly, "ERROR in Entry" BILLFORM.SetFocus End If End Sub Private Sub Data1_Error(DataErr As Integer, Response As Integer) If DataErr > 0 Then MsgBox "The following error has occured" & DataErr End If End Sub Private Sub Form_Activate() totamt = 0 RENFORM.Enabled = False Dim i As Integer Combo1.Clear If Data2.Recordset.BOF = False Then Data2.Recordset.MoveFirst End If Do While Not Data2.Recordset.EOF Combo1.AddItem (Data2.Recordset.Fields(2)) Data2.Recordset.MoveNext Loop For i = 1 To 12 Combo3.AddItem (i) Next For i = 1 To 31 Combo4.AddItem (i) Next For i = 1990 To 2099 Combo5.AddItem (i) Next For i = 1 To 12 Combo6.AddItem (i) Next Page : [53]

BCA
For i = 1 To 31 Combo7.AddItem (i) Next For i = 1990 To 2099 Combo8.AddItem (i) Next End Sub

Enr. No.

Private Sub Form_Unload(Cancel As Integer) RENFORM.Enabled = True End Sub

Private Sub txtamt_GotFocus() ccal.Enabled = False End Sub Private Sub txtamt_LostFocus() ccal.Enabled = True End Sub Private Sub txtbillno_LostFocus() Dim a As Integer If Data1.Recordset.BOF Then Combo1.SetFocus Else Data1.Recordset.MoveFirst Do While Not Data1.Recordset.EOF If txtbillno = Data1.Recordset.Fields(0) Then a = MsgBox("INVOICE NUMBER ALREADY EXISTS:CHANGE IT", vbOKOnly + vbCritical, "DUPLICATE ENTRY!") txtbillno = "" txtbillno.SetFocus Data1.Recordset.MoveLast Exit Do Else Data1.Recordset.MoveNext End If Loop Page : [54]

BCA
End If End Sub

Enr. No.

INSTALLATION UPDATE :-Private Sub cexit_Click() Unload Me RENFORM.Enabled = True RENFORM.SetFocus End Sub Private Sub cupdt_Click() If Data1.Recordset.EOF Then Data1.Recordset.MovePrevious Data1.Recordset.MoveNext Else Data1.Recordset.MoveNext Data1.Recordset.MovePrevious End If Data1_Reposition Dim NL As String NL = Chr(10) & Chr(13) X = MsgBox("The Current Record has been Updated !!!" & NL & "Do You Want to Update more Records ??? ", vbInformation + vbYesNo, "Record Update") If X = vbNo Then Unload Me RENFORM.Enabled = True RENFORM.SetFocus End If End Sub Private Sub Data1_Reposition() If Data2.Recordset.BOF = False Then Data2.Recordset.MoveFirst End If Do While Not Data2.Recordset.EOF If Data2.Recordset.Fields(0) = txtlotno Then Data2.Recordset.Edit Page : [55]

BCA
Data2.Recordset.Fields(5) = Combo1.Text Data2.Recordset.Update End If Data2.Recordset.MoveNext Loop End Sub Private Sub Text1_GotFocus() txtnocf.SetFocus End Sub Private Sub txtlotno_GotFocus() txtyrscon.SetFocus End Sub

Enr. No.

SUPPLY UPDATE :--

Private Sub cexit_Click() Unload Me RENFORM.Enabled = True RENFORM.SetFocus End Sub Private Sub cupdt_Click() If Data1.Recordset.EOF Then Data1.Recordset.MovePrevious Data1.Recordset.MoveNext Else Data1.Recordset.MoveNext Data1.Recordset.MovePrevious End If Data1_Reposition Dim NL As String NL = Chr(10) & Chr(13) X = MsgBox("The Current Record has been Updated !!!" & NL & "Do You Want to Update more Records ??? ", vbInformation + vbYesNo, "Record Update")

Page : [56]

BCA
If X = vbNo Then Unload Me RENFORM.Enabled = True RENFORM.SetFocus End If End Sub Private Sub Data1_Reposition() If Data2.Recordset.BOF = False Then Data2.Recordset.MoveFirst End If Do While Not Data2.Recordset.EOF If Data2.Recordset.Fields(0) = txtlotno Then Data2.Recordset.Edit Data2.Recordset.Fields(5) = Combo1.Text Data2.Recordset.Update End If Data2.Recordset.MoveNext Loop End Sub Private Sub Text1_GotFocus() txtnocf.SetFocus End Sub Private Sub txtlotno_GotFocus() txtyrscon.SetFocus
End Sub

Enr. No.

MACHINE DETAILS UPDATE :-Private Sub cexit_Click() Page : [57]

BCA
Unload Me frmselect.Show End Sub

Enr. No.

Private Sub cupdt_Click() If Adodc1.Recordset.EOF Then Adodc1.Recordset.MovePrevious Adodc1.Recordset.MoveNext Else Adodc1.Recordset.MoveNext Adodc1.Recordset.MovePrevious End If Dim NL As String NL = Chr(10) & Chr(13) X = MsgBox("The Current Record has been Updated !!!" & NL & "Do You Want to Update more Records ??? ", vbInformation + vbYesNo, "Record Update") If X = vbNo Then Unload Me RENFORM.Enabled = True RENFORM.SetFocus End If End Sub Private Sub Form_Activate() Adodc1.Refresh MCDT_EDIT.SetFocus End Sub Private Sub Text3_GotFocus() Text5.SetFocus End Sub

VENDOR DELETION :-Private Sub cdel_Click() Dim SSS As Integer If Data1.Recordset.BOF = True Or Data1.Recordset.EOF = True Then Page : [58]

BCA

Enr. No.

MsgBox "NO RECORD TO DELETE", vbInformation + vbOKOnly, "INVALLID ATTEMPT" Unload Me RENFORM.Show Exit Sub End If Data1.Recordset.Delete SSS = (MsgBox("RECORD HAS BEEN DELETED FROM THE DATABASE." & NL & "WANNA DELETE ANOTHER", vbInformation + vbYesNo, "RESPONSE REQUIRED")) If SSS = vbNo Then Unload Me RENFORM.SetFocus End If Data1.Recordset.MoveNext If Data1.Recordset.EOF Then If Data1.Recordset.BOF Then MsgBox "NO RECORD TO DELETE", vbInformation + vbOKOnly, "INVALLID ATTEMPT" Unload Me Exit Sub Else Data1.Recordset.MovePrevious End If End If End Sub Private Sub cexit_Click() RENFORM.Show Unload Me End Sub

INSTALLATION DELETION :-Private Sub cdel_Click() If Data1.Recordset.BOF Or Data1.Recordset.EOF Then MsgBox "NO RECORD TO DELETE", vbInformation + vbOKOnly, "INVALLID ATTEMPT" Page : [59]

BCA
Unload Me RENFORM.Show Exit Sub End If

Enr. No.

Data1.Recordset.Delete SSS = (MsgBox("RECORD HAS BEEN DELETED FROM THE DATABASE." & NL & "WANNA DELETE ANOTHER", vbInformation + vbYesNo, "RESPONSE REQUIRED")) If SSS = vbNo Then Unload Me RENFORM.SetFocus End If Data1.Recordset.MoveNext If Data1.Recordset.EOF Then If Data1.Recordset.BOF Then MsgBox "NO RECORD TO DELETE", vbInformation + vbOKOnly, "INVALLID ATTEMPT" Unload Me Exit Sub Else Data1.Recordset.MovePrevious End If End If End Sub Private Sub Command1_Click() RENFORM.SetFocus Unload Me End Sub

REPORT PROCESSING :-Private Sub CADD_Click() If Combo1 = "" Or Combo2 = "" Then MsgBox "INCOMPLETE DATA", vbCritical + vbOKOnly, "ERROR" Combo2.SetFocus Page : [60]

BCA

Enr. No.

Exit Sub End If If Data1.Recordset.BOF = False Then Data1.Recordset.MoveFirst End If Do While Not (Data1.Recordset.Fields(4) = Combo1 And Data1.Recordset.Fields(1) = Combo2) Data1.Recordset.MoveNext Loop If Data3.Recordset.BOF = False Then Data3.Recordset.MoveFirst End If Do While Not Data3.Recordset.EOF If Data3.Recordset.Fields(4) = Combo1 Then If Data3.Recordset.Fields(1) = Combo2 Then MsgBox "DUPLICATE ENTRY", vbCritical + vbOKOnly, "ERROR" Combo2.Clear Combo2.SetFocus Exit Sub End If End If Data3.Recordset.MoveNext Loop Data3.Recordset.AddNew Data3.Recordset.Fields(0) = Data1.Recordset.Fields(0) Data3.Recordset.Fields(1) = Data1.Recordset.Fields(1) Data3.Recordset.Fields(2) = Data1.Recordset.Fields(2) Data3.Recordset.Fields(3) = Data1.Recordset.Fields(3) Data3.Recordset.Fields(4) = Data1.Recordset.Fields(4) Data3.Recordset.Fields(5) = Data1.Recordset.Fields(5) Data3.Recordset.Update Combo2.Clear End Sub Private Sub cexit_Click() Unload Me RENFORM.SetFocus End Sub Private Sub Combo1_Click() Page : [61]

BCA
cadd.Enabled = True Combo2.Clear Do While Not Data2.Recordset.EOF Combo1.AddItem (Data2.Recordset.Fields(1)) Data2.Recordset.MoveNext Loop If Data1.Recordset.BOF = False Then Data1.Recordset.MoveFirst End If End Sub Private Sub Combo1_LostFocus() Combo2.Clear Do While Not Data1.Recordset.EOF If Data1.Recordset.Fields(4) = Combo1.Text Then Combo2.AddItem (Data1.Recordset.Fields(1)) End If Data1.Recordset.MoveNext Loop End Sub Private Sub Form_Activate() Do While Not Data2.Recordset.EOF Combo1.AddItem (Data2.Recordset.Fields(1)) Data2.Recordset.MoveNext Loop If Data1.Recordset.BOF = False Then Data1.Recordset.MoveFirst End If End Sub Private Sub Form_Unload(Cancel As Integer) DataEnvironment1.Connection1.Properties.Refresh End Sub

Enr. No.

Private Sub cdel_Click() If Data1.Recordset.BOF Or Data1.Recordset.EOF Then MsgBox "NO RECORD TO DELETE", vbInformation + vbOKOnly, "INVALLID ATTEMPT" Unload Me Page : [62]

BCA
RENFORM.Show Exit Sub End If

Enr. No.

Data1.Recordset.Delete Data1.Recordset.MoveNext If Data1.Recordset.EOF Then If Data1.Recordset.BOF Then MsgBox "NO RECORD TO DELETE", vbInformation + vbOKOnly, "INVALLID ATTEMPT" Unload Me Exit Sub Else Data1.Recordset.MovePrevious End If End If NL = Chr(10) & Chr(13) SSS = (MsgBox("RECORD HAS BEEN REMOVED FROM THE REPORT." & NL & "WANNA REMOVE ANOTHER", vbInformation + vbYesNo, "RESPONSE REQUIRED")) If SSS = vbNo Then Unload Me RENFORM.SetFocus End If End Sub Private Sub Form_Unload(Cancel As Integer) DataEnvironment1.Connection1.Properties.Refresh End Sub

*******--****--*******
INSTALLATION PROCEDURE System requirements: Page : [63]

BCA

Enr. No.

Recommended CELERON/P4 and 1 GB RAM Microsoft Windows XP/7 Operating System Microsoft Visual Basic 6.0 SQL Server 2005

Installation procedure: 1. 2. 3. Copy the folder Computer Rental Bill processing from CDROM to C:\ Open the folder and open project.vbp. Select each DATA CONTROLs and ADODCs in each form and click on the Database Name property and select manab.mdb from the selection box. Copy the folder C:\project to DESKTOP. Open the folder project and then open project.vbp

4. 5.

Making Executable File: 1. Select FILE>>Make project.exe 2. Save it on the DESKTOP

COMMENTS AND RECOMMENDATIONS

Page : [64]

BCA

Enr. No.

Though full care has been taken to make the project ERROR-FREE but there is always a possibility of occurrence of the same. Till now we have tried our best to eradicate all the errors we have encountered or anticipated, but we havent yet tested our SOFTWARE with ORIGINAL DATA for a sufficient period of time, so at this period of time we CAN NOT guarantee 100% CORRECTNESS of the project. There is a lot of scope for IMPROVEMENT of this project; hence we have attached all the codes & procedures with every minute detail so that they can be manipulated as per requirement for the betterment of the same. DRAW BACKS The user will have to connect all the DATA CONTROLS & ADODC on each form with the database through the Database Name property by clicking on the same and selecting the database name from the Dialog box in case of a System change(particularly on a SYSTEM which is not within the boundaries of the NETWORK).

Page : [65]

BCA

Enr. No.

BIBLIOGRAPHY

Mastering VB Evangelos petroustsos Mastering Database Connectivity Evangelos Petroustsos Murach's VB6 Joel Murach, Ed Koop, Anne prince SQL Server - The 16 essential Skills Celeste Robinson SQL Server in Developer's Handbook - Third edition Paul Litwin, KenGetz and mike Gilbert

Page : [66]

You might also like