Chapter Zubina

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 41

CHAPTER 1

INTRODUCTION

1.0 Background of the Study

Jeffrey U. (1997) defined a database as an organize collection of data.

The database typically organise to model relevant aspect of reality that

support processing, requiring this information, database is correctly

applied and their supporting data structure. The term Database

Management System implies that the data is managed to some level of

quality (measured in terms of accuracy, availability and resilience) and

this in turn implies the use of a general purpose database management

system (DBMS).

A general purpose of Database Management System (DBMS) is typically

a complex software system that meets many usage requirement to

properly maintain its database which often largely and complex. The

utilization of database is now so wide spread this virtually every

technology and product relies on database and for it development and

commercialization or may even have (DBMS) software embedded in it.

Also organization and companies, from small to large depend heavily on

database for their operations.

Database design is the process of producing a comprehensive data model

for a database with a storage and management parameters being present.

1
The database development life cycle start with requirement specification

for the database and end with the support and maintenance after its

implementation and development. Nowadays every business needs a

database for management of it business on different querying models

suitable for different organisation. Quebsys tech. (2012) ‘’what constitute

a small business varies widely around the world. Small businesses are

normally privately owned corporation, partnership or sole proprietorship.

What constitutes ‘’small’’ in terms of government support and tax policy

varies by laundry and by industry ranging from fewer than 15 employees

under the Australian fair work act 2009, 50 employee to qualify for many

US small business. Administration programs, although in 2006 there

where over 18,000 small businesses with over 500 employees that

accounted for half of all the employees employed by all small scale

business can also be classified according to other methods such as sales,

assets or net profits.

Small business are common in many countries like Nigeria, Ghana,

America, south Africa and many more, depending on the economics

system in operation. Typical examples include; provision stores, other

small shops (such as a bakery or a delicatessen), hairdressers, tradesmen,

lawyers accountants, restaurant, guest house, photographers, small scale

manufacturing and online business.

2
1.1 Statement of the Problems

Finding a new customer is one of the challenges for small business

owners. Edward T. (1979) Small business typically finds themselves

strapped for time but in other to create a continual stream of new

business; they must work on their marketing activities every day. The

statement of the problems includes;

 How to organise a perfect control over the expenditure, and those

budgetary control over the finance

 How to track the progress of your small scale industry

 How to sell to distant customers

 How to find their customers and get across to them

1.2 Purpose/Objectives of the Study

The aim of the study is to design and develop a database for small scale

business in Jimeta metropolitan city Yola with the integrity and capacity

to handle all data in an effective manner, store and protect the data. This

includes;

 To automate the database for small scale business

 To create a database management system for further research into

this topic with reference to the case study

 To simplify the entire task for small scale business owners

3
 Ease in operation of the administrative process of small scale

business

 To enhance the information ties that exist between small business

owners and their customers

1.3 Significance of the Study

Uganda’s economy has great potential endowed with significant natural

resources, including ample fertile land, regular rainfall, and mineral

deposits; it appears poised for rapid economic growth and development at

independence. According to USAID (2005), Uganda has become more

stable politically and is on the path to economic recovery, this can be

attributed to the re-establishment of law and other.

The business information system design for small and medium enterprise

(SMES) in northern Uganda The article report the study conducted in

northern Uganda to design a business information system (BIS) for small

and medium enterprise(SMES). A study by the Uganda bureau of statistic

(2005.30) establish that the majority of business enterprises depend on

‘’words of mouth’’. There is no meaningful mechanism for accessing

relevant information on business resources, a considerable amount of

which is available in Uganda. Based on this document fact there is a need

to establish the requirement for a BIS and to propose one by using

descriptive research design this studies establishes the business

4
information system requirements and recommendation, the appropriate

SMES in northern Uganda. The study establishes among other things: the

preferred business information processing formats, most appropriate

location of the BIS centre in northern Uganda and views on BIS on

efficient business information provision. The studies recommend as part

of the strategy to facilitate access to the BIS there should be the adoption

internet based services with the integration of an interactive business

planner, and small business workshop, the business start-up assistant:

telephone service, fax service and in back personal service, there should

also be a feedback mechanism coordinating from the Gulu district; the

coordinating centre and system interface should be flexible allowing the

acquisition of business information from both the micro and macro levels.

1.4 Scope of the Study

This study is delimited to design and development of database for small

scale business in Jimeta metropolitan city Yola.

1.5 Limitation of the Study

The researchers in the cause of this study encountered some limitations as

listed below:

5
 Time Frame: there is limited time to carry out a detailed research

on this project which made it impossible for the researchers to

survey all materials necessary for the project.

 Financial Constraint: there is no enough money to carry out

detailed research on the literature background of the study and

procurement of some software which made it impossible for the

researchers to get enough materials and textbooks.

6
CHAPTER 2
REVIEW OF RELATED LITERATURE

2.0 Introduction

This chapter reviews some applications used in the design and

development of database for small scale businesses. It draws up a

summary of work done and their motives. It also illustrates the

incorporation of database management system in database applications.

2.1 Database

Roland Birbal and Michele Taylor (1988) defined Database as a

collection of related data about a particular subject (person, place, or

thing) stored together. Manually database stored in filing cabinets were

the main method of storing large volumes of information before

computers become popular in offices and business. Many organizations in

the Caribbean still use manual database to store a lot of their data. This

method has been in use for a long time and works well for small amounts

of data. However, once the volume of data starts to increase it can present

many problems to the organization.

 Difficulty in cross-referencing data-retrieval of information is

slow.

 Large amount of storage space are needed for the cabinets.

 Folders can easily be misplaced.

7
 Information cannot be accessed from a remade site.

 Data may unnecessarily be duplicated in more than one file.

With the introduction of computers and database packages in to

organizations, manual database are becoming absolute. Typical business

database applications include:

 stock record
 personnel record
 customer record
 accounts and
 Mailing list
Features of Database
 Create and maintain (add, and revise records) a database.
 Extract and list all records or only those records that meet certain
conditions.
 Make an enquiry.
 Sort record in ascending or descending order by primary,
secondary and tertiary fields.
 Generate formatted reports with sub-totals and total.
 Meaning a database
 Meaning a database primarily involves the following six tasks
 Add new data to the database
 Sort the database into some meaningful order
 Search the database for types of information
 Print data from our database onto formatted reports
 Edit data on the database

8
 Delete data from the database.
Advantages of Database
 Reduce the amount of data duplication which occurs using
conventional files structures.
 Provide fast and flexible access information.
 Improves consistency of data stored.
 Provides both data and program independence.
 Encourages integration of functional areas in an organization.
 Avoid duplicating input data to update multiple functionally
independent files holding the same data.
 Reduces processing retrospective changes.
Disadvantages of Database
 Takes a long design and implement.
 Cost more than conventional systems.
 Require high calibre, experienced and specialized personnel.
 Require expense hardware and software.
 Recovery is more difficult in case of damage.

2.1.1 Database Package: is a piece of software that enables you to

organize and store related data together, so that specific pieces of

information can be retrieved easily and quickly.

Database can be used for a variety of applications such as organizing and

storing information about students in a school, disc jockeys, music

collections, and stocks in supermarket, members in the club and

employees in a company. This chapter will focus on the Microsoft access

9
2000 database package, which is another application in the Microsoft

office 2000 suite running on windows.

2.1.2 Manual Database.

Manual database: is a filling cabinet where one can open a draw to

retrieve or store a document manually. Examples includes: dictionary,

thesaurus among others but today most manual database have been

replaced by the computerized version which is easier and faster it comes

to record retrieval. Understanding how a manual database is set up will

greatly help in understanding how database are set up in access.

Consider the following examples below:

In a school without computer system all the information about students,

teachers, furniture and equipment are stored in different drawers in filing

cabinets. Let’s imagine the principal is looking for information pertaining

to particular forms of 1 student in the first drawer of one cabinet, she find

several folders containing information about form 1 student in the school.

One folder contains student’s personal information, one folder contains

information, another folder contains information about the parents, and

another folder contains information about students’ performance. There is

another folder that contains information about students that were

extracted from the student’s folder as shown below:

10
To find information about a student, the principal opens the drawer, and

select the appropriate folder and reads through the documents in the one

by one until he/she finds what he/she want. If the folder contains a lot of

information this could be a time-consuming process, the principal may

also find there is a lot of information that is duplicated.

School information filing

cabinet

Form 1
Form 1 Form 1
student Some folders in the first draw
Parent Performance
Student Folder1Folder2Folder3
1 Some information extracted from folder1

Form 1 Form 1 Form 1


Muslims Hindus Christians

2.1.3 Database Element

 Table can be defined as an organized collection of related records.

A table is the basic unit of database. It is a collection of related data

about a specific subject. A table is divided in to rows and columns.

Each row holds a record and each column represents a unique field.

11
 Field is an area reserved for each piece of individual data (each

data item) such as student no, surname, first name, date of birth.

e.t.c.

 Record; is a group of related fields pertaining to one person, place,

or thing e.g. information about each student.

 A query is a means of storing and answering questions about

information in a database. For example, you can create queries to

extract all the Hindus, Christians or Muslims.

2.1.4 Relational Database Model (RDBMS)

According to Hubbard (2002), Relational database model is the

most popular in use. Relational model development by code is logical

representation at the data that allows the relationship between the data to

be considered without concerning oneself with the physical

implementation of the structures. Biddle (1998) states that the data into

multiple tables that are related by common information (key). The

relational database model was created in 1990 by Dr. E.F. Codd, at IBM.

Edgar Codd who worked at IBM in San Jose, California, in one of their

offshoot offices that was primarily involved in the development of hard

disk systems. He was unhappy with the navigational model at the codasyl

approach, notably increasingly useful when the database was stored on

disk instead at tape. In 1970 he wrote a number of papers that outlined a

12
new approach to database construction that eventually committed in the

groundbreaking a relational model of data for large shared data banks.

Edgar codd (1990).

2.1.5 Data Independency

According to Hubbard (2002), one of the most important aspect of

database system is data independence (i.e. applications need not be

concerned with how data is physically stored or accessed). An application

is said to be data dependent if the storage and accessing strategy cannot

be changed without affecting the application significantly.

2.2 Data Base Management System (DBMS)

Jennifer W. (1999) describe DBMS as a computer program (or more

typically, a suite of them) designed to manage a database (a large set of

structured data), and run operations on the data requested by numerous

clients. Typical example of DBMS use include: accounting, human

resources and customer Support system. Originally found only in large

organizations with the computer hardware needed to support large data

sets, DBMS have more recently emerged as a fairly standard part of any

company back office.

DBMS are found at the heart of most database applications. Sometimes

DBMS are built around a private multitasking kernel with built in

13
networking support although nowadays these functions are left the

operating system.

A DBMS can be extremely complex set of software programs that

controls the organization, storage and retrieve of data (fields, record and

files) in a database. The basic functionalities that a DBMS must provide

are:

1. A modelling language that defines the scheme of each database

hostel in the DBMS, according to the DBMS data model. The three

most common organizations are the hierarchical, network and

relational models. A Database Management System may provide

one, two or all three methods. List and other methods are also used.

The most suitable structure depends on the application and on the

transaction rate and the number of inquiries that will be model. The

dominant model in use today is the ad, hoc one embedded in SQL,

a corruption of the relational model by violating several of its

fundamental principles.

2. Dater structures optimized to deal with big amounts of data

recorded to a permanent data storage device which is very slow

compare to the primary storage (volatile main memory).

14
3. A database query language and report writer to allow users to

interactively interrogate the database, analyze its data and update it

according to the user’s privilege on data.

 It also controls the security of the database.

 Data security prevents authorized users from viewing or updating

the database. Using passwords, users are allowed access to the

entire database or subsets of it called sub schemas (pronounced

“subschema”).

 If the DBMS provide a way to interactively enter and updating the

database, as well as interrogate it, this capability allows for

managing personal database. However, it may not leave an audit

trail of actions or provide the kind of controls necessary in the

multiuser organization.

4. A transaction mechanism that ideally would guarantee the ACID

properties, in order to ensure data integrity despite of concurrent

user access (concurrency control) and faults (fault tolerance). It

controls the integrity of the database.

The DBMS can maintain the integrity of the database by not allowing

more than one users to update the same record at the same time. The

DBMS can keep duplicate records out of the database, for example, no

15
two customers with the same customer numbers (key fields) can be

entered into the database.

The DBMS accepts request for data from the application program and

instruct the operating system to transfer the appropriate data.

When a DBMS is used, information system can be changed much more

easily as the organizations information requirements change. New

categories of data can be added to the database without disruption to the

existing system.

Organizations may utilize any kind of DBMS for daily transaction

processing and then move the detail onto another computer that uses

another DBMS better suited for random inquiries and analysis. (Davidson

1999).

2.3 Small Scale Business

Small Scale Business is a business that employs a small number of

workers. Small Scale Business are normally privately owned corporation

partnerships or sole proprietorships, what constitutes small in terms of

government support and tax policy varies by country and by industry,

ranging from fewer than 15 employees. According to the definition used

by the European union, and fewer than 500 employees to qualify for

many U.S. small business administration programs, although in 2006

16
there were over 18,000 small “business” with over 500 employees that

accounted for half of all the employees employed by small “business”

(112) small business can also be classified according to other methods

such as sales, assets, or net profits.

Small business is common in many countries, depending on the

economic system in operation. Typical example include: convenience

store, other small shops(such as a bakery or delicatessen) hair dressers,

trades men, lawyers, accountants, restaurants, guest houses,

photographers, small scale manufacturing and online business such as

web design and programming etc.

2.3.1 Characteristic of Small Scale Businesses Size Definitions

1. The legal definition of “small business” varies by country and by

industry. In the United States the small business administration

establishes small business size standards in an industry-by-industry basis,

but generally specifies a small business as having fewer than 250

employees for manufacturing businesses and less than 57 million in

annual receipts for most of manufacturing businesses.

2. The definition can vary by circumstance for example; a small business

having fewer than 25 full-time equivalent employees with average annual

17
wages below $50,000 qualifies for a tax credit under the health care

reform bill patient protection and affordable care act.

3. The European Union generally defines small business as one that has

fewer than fifty employees (50), however, in Australia; a small business

is defined by the fair works act 2009 a one with fewer than fifteen

employees. By comparison a medium sized business or middle sized

business has less than five Hundred (500) employees in the U.S, and

fewer than two Hundred in Australia.

2.3.2 Small Scale Industry

The small scale industry form the backbone of the nation and become

important for the development of the economy to the under developed,

developing as well as developed nations, Qubesys understand this

phenomena and the important of the small scale industry and thus

provides you the perfect business solution for your area of interest. The

small scale industry has a lot of important contribution to make to the

economic development of the nation. Shokan O.O (1997) when the pride

of brand named is at stake than the best way to insure your business-

supremacy is to create awareness of your potential customers. The most

efficient way in which this process can be done is by getting yourself

studded with perfect business solutions; Qubesys provides the

incomparable and unsurpassed business solutions for the scale industry.

18
The following are part of the solution that is provided:

 Employee management tools: These tools are perfectly made in

other to track the progress of your small scale business. Qubesys

understand that the growth of a small scale industry depends upon

the productivity of its employees. The employee management tools

thus track the efficiency of the employees through their work

capacity and thus help you to differentiate between the skilled,

semi-skilled and the un-skilled people. This will help you to check

out a perfect plan to improve your weal areas and take your

business to a higher level.

 Capital management system: Small scale industries require

perfect control over the expenditure and thus budgetary control

over the finance almost important Therefore Qubesys provides you

with the proper capital management tool that will service you the

obligatory purpose.

19
CHAPTER 3
METHODOLOGY
3.0 Introduction

This Chapter, the method and procedures followed to undertake this

research work. It comprises of:

a. Design and

b. Development of database for small scale business.

3.1 Research Methodology

In the course of this research, secondary method was used for the

collection of data. Through the use of design and development of

database for small scale business within Jimeta metropolitan city Yola

3.2 Sample Population

For the purpose of this write up, our research carry out from Yakubu

shopping Plaza Jimeta city Yola, constitute the population size to be used.

It is estimate that of the sample is properly available to people, the

opinion of the sample will be okay, representation of the population so

that conclusion reached would be valid.

20
3.3 Application

This contains the brief description of the procedures and functions that is

how the program is to be developed and stating what the program will do

and how it will work, after the design specification.

Start the program (After installation if


for the first time)

Welcome form shows up and goes after


some minutes

Password form comes up for


Authorization

Register Regular customer by selecting


Manage – Register Regular customer

Select Sale for selling purposes

Select Report to view previous sales


and registered customers

Select Manage Exit to close the


program

3.4 Research Procedure

Using table and forms ended at designing was that, design was prepared

by the designer to be developed a selected organization for small scale

businesses of Jimeta metropolitan city. By using MS Access to design the

database and Visual basic6.0 as the programming language. After the

21
designers have filled the expectation design, the observer will now use

the filled one of the design for analysis.

3.5 System Conversion

The system conversion is referred to as change over plan in order

to change from the existing system to the new system in as much a

project is concerned the techniques was used.

3.6 Program Requirement

The requirement of this program include the following

i. Windows 7

ii. Microsoft visual basic 6.0

iii. Micro soft access 2013

3.7 System Analysis

This is a structure and systematic process of studying how a system

will work and then designing and realizing such functions. System

analyst is mainly concerned with the proper study of the current system

with the aim of discovering problem areas affecting its efficiency.

Consequently, this stage will give recommendations (with alternatives)

for redesigning the system for improved performance. During this phase,

it was discovered that the current system lacks a proper communication

22
link between the business owners and the customers, resulting in to delay

in the process of the transaction. Base on the findings above, the

researcher (system analyst) recommends that a database be design for

small scale business owners with features that will enhance a direct link

between the business owners and their customers.

3.8 System Design

The main goal of this deigned is to transform the requirements and

specification from the analysis phase in to a functional system. Thus, the

physical model is created from the logical model. So many designers,

especially newer, freelance workers, jumble up the process of design.

This is not a very good idea as it leads to failures which the designers

may not even be aware of.

23
CHAPTER 4
SYSTEM DOCUMENTATION AND IMPLEMENTATION

4.1 System Documentation

Documentation is the key to design and development of the

application software as it’s provide avenue for further checkups. The

design model and the complete set of source code has been compile

together with an optical storage media known as compact disc (CD)

which also its usage in every computer system that support the use of this

media. Documentation also includes user’s manual and on-screen help

which will enable the user to operate the package without much

difficulties.

4.2 System Implementation

System implementation is the stages in which specifications are

presented at the design stage are turn into a developed and ready to use

system. It is concern with interpreting the design and putting it into use.

This entails testing resources such as computer programs, searching for

from the user existing manual system into computer base system. The

stage involves giving appropriate training to those that would operate the

system (Secretary, managerss. etc.).

24
This program is specially design to be use within Jimeta Metropolis but

can be used by other places that wants to convert their system into

computer base.

25
4.3 User Manual

User manual allows the system usage in a proper way and provide
guides on how to operate the system

The way to use this package is as follows;

i. Load application (After Installation, if for the first time)


ii. The welcome form comes up an go after some seconds while
preparing the application
iii. The Login form comes up for user authorization (Password
form), if Username and Password are correct it moves to next
Level
iv. The main Menu form shows up which will be use to access all
other forms
v. Use Manage – Regular customer to register a regular customer
vi. Use Manage – Exit to close the program
vii. Use Sales for Entering and recording a sale
viii. Use Sales Report for viewing previous sales report and
registered customers
ix. Use Details to view the details of the program.

4.4 Program Testing

There is need to test the system to ensure that it works as planned. System
testing, or test run entails eliminating mistakes or error caused by faulty
logic, referred to as which prevent the program from running and
producing correct result. The process is known as debugging.

4.5 Program Caution

26
This program should not be operated without first opening the main menu
and picking the right option if this is not done the program may crash or
give a wrong result.

4.6 Program Specifications

To show the program specification the pseudo code can be used to


represent the program therefore pseudo code is used in this program
before it’s coding in (program pseudo code specified in appendix) and
user documentation.

4.7 Program Installation

The program is safely kept in 700mb 180mn C D ROM.This will allow other
programmers who are interested in the program to further develop it. To
install the program below are the procedures to be follow:

 Insert the CD plate


 Make a directory called c:/ small scale business
 Copy the file into the directory c:/ small scale business

27
CHAPTER 5
SUMMARY, CONCLUSION AND RECOMMENDATION

5.0 Introduction

This chapter consist of the summary, conclusion and recommendation of

the research topic from chapter one (1) to chapter four (4).

Major finding has already been analyzed in the preceding chapter.

The researcher work is carried out on the design and development of

database for small scale business as a tool for fraud prevention. (A case

study of Jimeta metropolitan city).

5.1 Summary

The design and development of a Database Management System for

small scale business was studied and undertaken. After examining the

characteristics of the existing system and their bottleneck, it was

established that such systems need improvement, especially in the area of

improving small scale business. The statement of the problems reveals

the various problems faced by the Jimeta metropolitan city, during the

traditional format of small business transactions.

The aims and objectives of the study is to provided an automated

system for small business with integrity and capacity to handle all

business transactions in an effective manner. The significance of the

28
study gave justified reasons on the internet as a tool for the processing of

online marketing and also for feedback. The work is confined to the use

of designed to accept and update a database maintained by the owners.

5.2 Conclusion

Sequel to the research made throughout this work, we perceived that the

concept of building a full blown application with server side capabilities

and database is made clear. Majority of the world’s commercial business

are done on the internet. Also web applications are really improving other

activities such as news dissemination, entertainment, education and

research development.

Finally after all these, a fully working data driven online marketing

system was actualized.

5.3 Recommendations

1. A future researcher should be able to develop and implement similar

work in order to enhance the security of user provided data.

2. HTML and JavaScript were utilized in the production of this site. I

recommended that XML and java PHP be used in the next upgrade in

order to improve its functionalities and flexibility.

29
3. Microsoft access was used to create the database. I recommend that

mysal or oracle be used in the next upgrade so as to improve data

security.

30
REFERENCE

ANDESON R. C. (1990) Data processing vol.1 London pitman


publishing, London, 7th Edition p51

BEDINFIELD J. P. (1994) the effect of recent litigation on auditing


practice first edition, Delmar publisher, Sydney. P60

EZEANO A. N. (1998) unpublished lecture notes on introduction to


system analysis

EDWART T. F. (1979). Internal control evaluation New York. Second


edition, p4

OKOLO J. U. T. (1978) the concept and practice of auditing. First


edition p35

SAGE S. M. (1968) development of information revival system crawl


publishers limited England. Second edition p92

STRIR R. M. (1986). Computer in today’s world. Eitspter 9x12 5th


edition p41s

WATER B. (1977). Financial accounting and auditing, Decmer


publishers, Sydney. 5th edition p2s

31
APENDIX (Pseudo Code)
4.3.1 Welcome Form
Private Sub Timer1_Timer()
frmLogin.Show
Unload Me
End Sub
4.3.2 Login Form
Private Sub cmdCancel_Click()
Dim Msg As String
Msg = MsgBox("Are You Sure?", vbYesNo + vbQuestion, "Quit")
If Msg = vbYes Then
End
End If
End Sub
Private Sub cmdOK_Click()
If txtPassword.Text = "ADMIN" And txtUserName.Text = "ADMIN"
Then
Unload Me
MDIForm1.Show
Else
MsgBox "Invalid Login Information, try again!",vbCritical, "Login"
txtPassword.Text = ""
txtUserName.Text = ""
txtUserName.SetFocus
End If
End Sub
4.3.3 Menu Form

32
Private Sub exit_Click()
Dim MsgAs String
Msg = MsgBox("Are You Sure?", vbYesNo + vbQuestion, "Quit")
If Msg = vbYes Then
End
End If
End Sub
Private Sub fgghuu_Click()
MsgBox "This Program was Design by Adamawa State Polytechnic
Student as Project Under the Supervision of MallamAliyuAbubakar, for
Computer Science Department", vbInformation, "Details"
End Sub
Private Sub regul_Click()
Form1.Show
End Sub
Private Sub Sales_Click()
Form2.Show
End Sub
Private Sub Salesrep_Click()
Form3.Show
End Sub
4.3.4 Regular Customer Registration Form
Private Sub Command1_Click()
Data1.DatabaseName = App.Path& "/DATA.MDB"
Data1.RecordSource = "REG"
Data1.Refresh
With Data1.Recordset

33
.AddNew
.Fields!id = Text1.Text
.Fields!Name = Text2.Text
.Fields!GENDER = Combo1.Text
.Fields!ADDRESS = Text3.Text
.Fields!OCCUPATION = Text4.Text
.Fields!PHONE = Text5.Text
.Update
End With
MsgBox "Information Saved Successfully", vbInformation, "Save"
Unload Me
Me.Show
End Sub
Private Sub Command2_Click()
Dim a As String
aa = InputBox("Enter Customer ID to Search", "Search")
Data1.DatabaseName = App.Path& "/DATA.MDB"
Data1.RecordSource = "REG"
Data1.Refresh
Do Until Data1.Recordset.EOF
If Data1.Recordset.Fields!id = aa Then
With Data1.Recordset
Text1.Text = .Fields!id
Text2.Text = .Fields!Name
Combo1.Text = .Fields!GENDER
Text2.Text = .Fields!ADDRESS
Text4.Text = .Fields!OCCUPATION
34
Text5.Text = .Fields!PHONE
Exit Sub
End With
End If
Data1.Recordset.MoveNext
Loop
MsgBox "Customer Not Found Check ID and Try Again",
vbInformation, "Search"
Unload Me
Me.Show
End Sub
Private Sub Command3_Click()
Data1.DatabaseName = App.Path& "/DATA.MDB"
Data1.RecordSource = "REG"
Data1.Refresh
Do Until Data1.Recordset.EOF
If Data1.Recordset.Fields!id = Text1.Text Then
With Data1.Recordset
.Edit
.Fields!id = Text1.Text
.Fields!Name = Text2.Text
.Fields!GENDER = Combo1.Text
.Fields!ADDRESS = Text2.Text
.Fields!OCCUPATION = Text4.Text
.Fields!PHONE = Text5.Text
.Update
End With

35
End If
Data1.Recordset.MoveNext
Loop
MsgBox "Information Updated Successfully", vbInformation, "Update"
Unload Me
Me.Show
End Sub
Private Sub Command4_Click()
Data1.DatabaseName = App.Path& "/DATA.MDB"
Data1.RecordSource = "REG"
Data1.Refresh
Do Until Data1.Recordset.EOF
If Data1.Recordset.Fields!id = Text1.Text Then
With Data1.Recordset
.Delete
End With
End If
Data1.Recordset.MoveNext
Loop
MsgBox "Information Deleted Successfully", information, "Deleted"
Unload Me
Me.Show
End Sub
Private Sub Command5_Click ()
Unload Me
End Sub
Private Sub Text2_KeyPress (KeyAscii as Integer)
36
Dim ALPHA, SPACE, BACK As Boolean
ALPHA = KeyAscii>= vbKeyA And KeyAscii<= vbKeyZ Or
KeyAscii>= Asc("a") And KeyAscii<= Asc("z")
SPACE = KeyAscii = vbKeySpace
BACK = KeyAscii = vbKeyBack
If enter Then
If Trim(Text2) = "" Then
Text2.SetFocus
Exit Sub
End If
Text2.SetFocus
ElseIf Not (ALPHA Or SPACE Or BACK) Then
KeyAscii = 0
End If
End Sub
4.3.5 Sales Form
Private Sub Command1_Click()
Data1.DatabaseName = App.Path& "/DATA.MDB"
Data1.RecordSource = "INCOME"
Data1.Refresh
Do Until Data1.Recordset.EOF
If Data1.Recordset.Fields![Date] = Label1.Caption Then
With Data1.Recordset
.Edit
.Fields![Date] = Label1.Caption
.Fields!AMOUNT = Val(Label3.Caption) + Val(Label17.Caption)
.Update

37
Unload Me
Me.Show
Exit Sub
End With
End If
Data1.Recordset.MoveNext
Loop
Data1.Refresh
With Data1.Recordset
.AddNew
.Fields![Date] = Label1.Caption
.Fields!AMOUNT = Label17.Caption
.Update
End With
Unload Me
Me.Show
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Label1.Caption = Format(Now, "dd/mm/yyyy")
Me.Width = 10590
Me.Height = 7020
Option1.Value = 1
Data1.DatabaseName = App.Path& "/DATA.MDB"
Data1.RecordSource = "INCOME"
38
Data1.Refresh
Do Until Data1.Recordset.EOF
If Data1.Recordset.Fields![Date] = Label1.Caption Then
With Data1.Recordset
Label3.Caption = .Fields!AMOUNT
Exit Sub
End With
End If
Data1.Recordset.MoveNext
Loop
Label3.Caption = "0"
End Sub
Private Sub Option1_Click()
If Option1.Value = True Then
Label19.Caption = "NOT A REGULAR CUSTOMER THERE IS NO
DISCOUNT"
End If
End Sub
Private Sub Option2_Click()
Dim aa As String
aa = InputBox("ENTER CUSTOMER ID TO CONFIRM",
"CONFIRMING")
Data1.DatabaseName = App.Path& "/DATA.MDB"
Data1.RecordSource = "REG"
Data1.Refresh
Do Until Data1.Recordset.EOF
If Data1.Recordset.Fields!id = aa Then

39
With Data1.Recordset
Label19.Caption = .Fields!Name& " IS A REGULAR CUSTOMER
HERE"
Exit Sub
End With
End If
Data1.Recordset.MoveNext
Loop
MsgBox "Customer Not Found Check ID and Try Again",
vbInformation, "Search"
Option1.Value = True
End Sub
Private Sub Text1_Change()
Label13.Caption = Val(Text1.Text) + Val(Text2.Text) + Val(Text3.Text)
+ Val(Text4.Text) + Val(Text5.Text) + Val(Text6.Text) +
Val(Text7.Text) + Val(Text8.Text)
If Option1.Value = True Then
Label17.Caption = Label13.Caption
End If
If Option2.Value = True Then
Label14.Caption = Label13.Caption / 10
Label17.Caption = Val(Label13.Caption) - Val(Label14.Caption)
End If
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
Dim ALPHA, SPACE, BACK As Boolean
ALPHA = KeyAscii>= vbKey0 And KeyAscii<= vbKey9 Or
KeyAscii>= Asc("0") And KeyAscii<= Asc("9")
SPACE = KeyAscii = vbKeySpace
40
BACK = KeyAscii = vbKeyBack
If enter Then
If Trim(Text1) = "" Then
Text1.SetFocus
Exit Sub
End If
Text2.SetFocus
ElseIf Not (ALPHA Or BACK) Then
KeyAscii = 0
End If
End sub
Private Sub Timer1_Timer()
Label2.Caption = Format(Now, "hh:mm:ss")
End Sub
4.3.6 Report Form
Private Sub Command1_Click()
Form3.PrintForm
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Option1_Click()
Adodc1.RecordSource = "SELECT*FROM INCOME;"
Adodc1.Refresh
End Sub

41

You might also like