Beruflich Dokumente
Kultur Dokumente
INTRODUCTION
PROJECT DESCRIPTION
This project “MILK MANAGEMENT” contains four modules. They are as follows:
PURCHASE DETAILS
SALES DETAILS
CUSTOMER DETAILS
EMPLOYEES DETAILS
ORDER DETAILS
STOCK DETAILS
1
Employees Detail Form:-
This module contains the Employee ID, Employee Name, Gender,
Address, Mobile No, Qualification, Experience, Destination.
Order Details Form:-
This module contains the Order NO, Dealer ID, Dealer Name, Product ID,
Product Name, Quantity, Date of Order.
Stock Details:-
This module contains the Product ID, Opening stock date, Closing stock
date, Product Name, Amount.
2
CHAPTER II
SYSTEM CONFIGURATION
HARDWARE REQUIREMENTS
RAM : 2GB
SOFTWARE REQUIREMENTS
3
ABOUT THE SOFTWARE
Microsoft Visual Basic, 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 with a complete set of tools to simplify rapid application
development.
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 rebuilt objects into place on screen.
If you’ve 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) Language, 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 professional to accomplish anything that can be
accomplished by using other windows programming language.
The Visual Basic programming language is not unique to Visual Basic. The Visual Basic
programming system, Applications Edition included in Microsoft Access, any 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 of 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.
4
1. Data access features allow you to create databases, Front End applications and
scalable server-side components for most popular database formats, including
Microsoft SQL, server and other Enterprise-level databases
4. Your finished application is a true .exe file that you can freely distribute.
Visual Basic has an IDE. IDE means Integrated Development Environment. The Visual
Basic Integrated Development Environment (IDE) consists of the following elements.
Menu Bar
Displays the commands you use to work with Visual Basic. Besides and Standard File,
Edit, View, Window, and Help menus, menus are provided to access functions specific to
programming such as Project, Format, or Debug.
Visual Basic has an IDE. IDE means Integrated Development Environment. The Visual
Basic Integrated Development Environment (IDE) consists of the following elements.
Standard EXE
This is the option we probably will use the most. It allows us to create a Standard
executable file.
ActiveX EXE
ActiveX DLL
Visual Basic allows us to create Active X DLL files, Select this option to create DLL.
5
ActiveX Control
The creation of ActiveX controls is supported by Visual Basic. Select this option to
create ActiveX control.
VB Application Wizard
VB Wizard Manager
The Wizard Manager lets us to create wizards that look and acts similar to those used in
Microsoft products.
ADD-IN:
Add–INS are tools that we bring into the Visual Basic development environment to
customize the environment.
The other types of creating a new project are as follows ActiveX Document EXE,
ActiveX Document DLL, and DHTML Application.
Context Menu
Contain shortcuts to frequently performed actions. To open a context menu, click the
right mouse button on the object you’re using. The specific list of shortcuts available from
context menus depends on the part of the environment where you click the right mouse button.
For example, the context menu displayed when you right click on the Toolbox lets you display
the components dialog box, hide the Toolbox, dock or undock the Toolbox, or add a custom tab
to the Toolbox.
Tool bars
Provide quick access to commonly used commands in the programming environment.
You click a button on the toolbar once to carry out the action represented by that button. By
default, the standard toolbar is displayed when you start Visual Basic. Additional toolbars for
editing, form design, and debugging can be toggled on or off from the toolbars command on the
view menu.
6
Toolbars can be docked beneath the menu bar or can “float” if you select the vertical bar
on the left edge and drag it away from the menu bar.
Tool Box
Provide a set of tools that you use at design time to place controls on a form. In addition
to the default toolbox layout, you can create your own custom layouts by selecting Add Tab from
the context menu and adding control on the resulting tab.
Properties Window
Lists the property settings for the selected form or control. A property is a characteristic
of an object, such as size, caption, or color.
Object Browser
List objects available for use in the project and gives us a quick way to navigate through
our code. We can use the object browser to explore objects in Visual Basic and other
applications, see what methods and properties are available for those objects, and paste code
procedures into our application.
Form Designer
Servers as a window that we customize to design the interface of our application. We add
controls, graphics, and picture to a form to create the look we want. Each form in your
application has its own form designer window.
7
Form Layout Window
The form layout window allows you to position the forms in your application using a
small graphical representation of the screen.
These additional windows are provided for use in debugging your application. They are
only available when you are running your application within the IDE.
Microsoft has defined an open, extensible standard for software interoperability. The
Component Object Model (COM) makes it possible for software components that user create to
work with other software components, including software user by off-the-self.
Reusability
One user creates a COM component, other developers can use it. This
enables easy access to user components in other applications without
requiring developers to write extensive code.
Reduced complexity
User can create a COM component to hide programming complexity than
other programmers. Other programmers need only know what information
to provide to user component, and what information to retrieve.
8
Easier updating
Components make it easier for user to revise and update user application.
For example, user can create a COM component that encapsulates
business rules. If the business rules change, user updated just the
component, not all the applications that use the component.
MDI Forms
MDI stands stands for Multiple Document Interface. It is the type of user interface used
by most of the applications in the Microsoft Office suite, including Microsoft Word, Microsoft
Excel, and Microsoft Power Point. Many applications lend themselves to implementation via an
MDI user interface. Whenever the user has application that should be able to deal with multiple
documents at the same time, an MDI interface is probably the best choice.
Database Controls
DAO
When Visual Basic first started working with databases, it used the Microsoft Jet
database engine, which is what Microsoft Access uses. Using the Jet engine represented a
considerable advance for Visual Basic, because now you could work with all kinds of data
formats in the fields of a database: text, numbers, integers, longs, singles, doubles, dates, binary
values, OLE objects, currency values, Boolean values, and even memo objects (up to 1.2GB of
text). The Jet engine also supports SQL, which database programmers found attractive.
To support the Jet database engine, Microsoft added the data control to Visual Basic, and
you can use that control to open Jet database (.mdb) files. Microsoft also added a set of Data
Access Objects (DAO) to Visual Basic:
9
Recordset—The set of records that make up the result of a query
Field—A column in a table
Index—An ordered list of records
Relation—Stored information about the specific relationship between tables
We’ll work with these Data Access Objects in the next chapter; in this chapter, we’ll
work with the data control.
RDO
Remote Data Objects (RDO) connect to databases using ODBC. You set up ODBC
connections to databases using the ODBC item in the Windows Control Panel, and then use one
of those connections with the RDO objects. The Remote Data Objects are designed in parallel
with the Data Access Objects; for example, the database engine is RDO Engine instead of DB
Engine, Record sets have become RDO Result sets, Table Defs became RDO Tables,
Workspaces became RDO Environments, Field objects became RDO Column objects, and so on.
Although the names have changed, the command set is very similar to DAO. Although Microsoft
intends ADO to super cede RDO, many programmers will use RDO for some time to come. In
this chapter, we’ll take a look at RDO with the remote data control.
ADO
Microsoft’s latest set of data access objects are the ActiveX Data Objects (ADO). These
objects let you access data in a database server through any OLE DB provider. ADO is intended
to give you a consistent interface for working with a wide variety of data sources, from text files
to ODBC relational databases to complex groups of databases.
The way Microsoft implements connections to all those data sources is with the OLEDB
set of COM interfaces, but that standard is a very complex one. Our interface to that interface, so
to speak, is ADO, a set of objects with properties, events, and methods.
Connection - Access from your application to a data source is through a connection, the
environment necessary for exchanging data. The Connection object is used to specify a
particular data provider and any parameters.
10
Command - A command issued across an established connection manipulates the data
source in some way. The Command object lets ADO make it easy to issue commands.
Parameter - Commands can require parameters that can be set before you issue the
command. For example, if you require a debit from a charge account, you would specify
the amount of money to be debited as a parameter in a Parameter object.
Record set - If your command is a query that returns data as rows of information in a
table, then those rows are placed in local storage in a Record set object.
Field - A row of a Recordset consists of one or more fields, which are stored in Field
objects.
Error - Errors can occur when your program is not able to establish a connection, execute
a command, or perform an operation, and ADO supports an Error object to hold the
resulting error.
Collection - ADO provides collections, an object that contains other objects of a
particular type. ADO provides four types of collections: the Connection object has the
Errorscollection, the Command object has the Parameters collection, the Recordset object
has the Fieldscollection, and the Connection, Command, Recordset, and Field objects all
have a Properties collection, which contains all the Property objects that apply to them.
Events - ADO uses the concept of events, just like other interface objects in Visual Basic.
You use event handling procedures with events. There are two types of events:
ConnectionEvents(issued when transactions occur, when commands are executed, and
when connections start or end) and RecordsetEvents(events used to report the progress of
data changes).
ADO also includes the Remote Data Service (RDS), with which you can move data from
a server to a client application or Web page, manipulate the data on the client, and return updates
to the server in one round-trip.
The ADO data control is similar to the data control and the remote data control. The
ADO data control is designed to create a connection to a database using Microsoft ActiveX Data
Objects (ADO). At design time, you create a connection by setting the ConnectionStringproperty
to a valid connection string, and then set the Record Source property to a statement appropriate
11
to the database manager. You can also set the ConnectionStringproperty to the name of a file that
defines a connection (the file is generated by a Data Link dialog box, which appears when you
click ConnectionString on the Properties window and then click either Build or Select). You then
connect the ADO data control to a data-bound control such as the data grid, data combo, or data
list control by setting its DataSource properties to the ADO data control.
At runtime, you can set the Provider, Connection String, and Record Source properties to
change the database. We’ll see how to work with the ADO control in this chapter. We’ll use
controls like the data control, the remote data control, and the ADO data control with bound
controls.
You can bind certain controls to the data control, the remote data control, and the ADO
data control and those controls are called bound controls. To bind a control to a database control,
you use properties like DataSourceto specify the database control, and then use properties like
DataFieldorBoundColumnto specify what field to display in the bound control, as we’ll see. Here
are the controls that can function as bound controls:
Picture boxes
Labels
Text boxes
Checkboxes
Image controls
OLE controls
List boxes
Masked edit controls
Rich text boxes
Combo boxes
In addition, there are special controls that are designed to be used as bound controls:
DBList
DBCombo
FlexGrid
12
MSFlexGrid
Finally, a number of bound controls are specially built to be used with the ADO control
only:
DataList
DataCombo
DataGrid
MICROSOFT ACCESS
Due to voluminous data we are required to store it in a database fields and retrieve it.
This data base file Structure is very essential programmer since it is not known for the user it is
called back-end tool. Visual basic has a native data base driver called MS-Access; It is a
relational data base management system several tables can be grouped under a Single data base
MS-Access 7.0 provides that facility to remove / add field to a table and it provides several
commands to retrieve the data directive from MS access 7.0 since the back end tool is the back
bone of the project .This project select MS-Access as its back end tool.
Features of MS-Access
Back-End Database
13
The can now use Access to develop databases in a client /server environment such as
Microsoft’s SQL Server. Access in not only for a stand-alone computer, it uses a full-featured
development tool for high-powered database platforms.
Data Access
Data Access Pages are web pages that the user can create and link to an Access database.
The main window used in Access has been made friendlier. Menus have been segregated
into sets of commonly used and less-used items.
Office Clipboard
Using the new Office Clipboard, the use can copy multiple items, at different times and
from different applications, and pause them all at one time.
Projects
Now the user can use Microsoft Access as front-end databases development tool without
actually storing the data in the Access file. The Access Project file contains forms, reports,
macros, modules, and Data Access Pages. It does not any contain tables, queries, or views.
Because these are kept in the back-end database.
Subdatasheets
These allow the user to view the data in a hierarchical mode. The user can drill down to
related data.
Web Folders
This is a new feature of Office 2000 that allows the link our Windows Explorer file
system to Web servers. If the web server supports the FrontPage extensions, the user can open
and save Access databases (and any other file) on a web server easily using web folders.
14
The server main objects in Access include tables, queries, forms, reports, pages, macros
and modules. In Access, the object which holds the database is called a Table. Database has
different objects, such as tables, queries, and forms. There are stored in a single access file.
Forms
The user can create forms by entering the data into the database. This helps in displaying
the data in a structural manner.
Macros
As in other Office software, Macros are used for repetitive commands. These commands
can be stored in a macro and performed effectively.
Modules
Pages
As mentioned above pages are new to Access 2000. These HTML documents are directly
bounded to the data in a database.
Queries
A query is used to extract information from the table. These can be used to select,
change, add or delete records in a database. This information can be printed using Reports.
Reports
It presents the data in a printed format. Reports can be based on the tables to show all the
data form the given table, or they can be based on queries to show only information that meets
certain criteria.
Tables
A table is used to hold the raw data of the database. The user can enter the data into a
table it is then organized into rows and columns.
15
CHAPTER III
PROJECT DESIGN AND DEVELOPMENT
TABLE DESIGN
Purchase Details
Billno Number
Dealerid Number
Dealername Text
Proid Number
Proname Text
Quantity Number
price Number
Total Number
dateofpurchase Date/time
Sales Details
Sno Number
Proid Number
Proname Text
Prorate Number
Discount Number
16
Amount Number
Customer Details
Custid Number
Custname Text
Addr Text
Phno Text
Mailed Text
Dateofpur Date/time
Employee Details
Eid Number
Emname Text
Gend Text
Religion Text
Addr Text
Phno Text
Quail Text
Exp Text
Desti Text
Order Details
17
Field Name Data Type
Ordno Number
Dealid Number
Dealname Text
Proid Number
Proname Text
Quantity Number
Dateoford Date/time
Stock Details
Comid Text
Billno Number
Sellername Text
Comname Text
Proddeal Text
Proid Text
Proname Text
Prorate Number
Prosellrat Number
CODINGS
Login Form
Option Explicit
18
Public LoginSucceededAs Boolean
LoginSucceeded = False
Me.Hide
End Sub
LoginSucceeded = True
MDIForm1.Show
Me.Hide
Else
txtPassword.SetFocus
End If
End Sub
MDI FORM
frmcomdetails.Show
End Sub
frmcomview.Show
End Sub
End
19
End Sub
frminterview.Show
End Sub
frmintview.Show
End Sub
Form1.Show
End Sub
frmcomreq.Show
End Sub
frmreqview.Show
End Sub
frmstudent.Show
End Sub
frmstuview.Show
End Sub
20
Dim rs1 As New ADODB.Recordset
rs.MoveFirst
While Notrs.EOF
Label12.Caption = rs(1)
Label15.Caption = rs(2)
End If
rs.MoveNext
Wend
End Sub
If (rs1.Fields(0) = 0) Then
Label9.Caption = 1
Else
Label9.Caption = rs1.Fields(0) + 1
End If
Combo1.Text = ""
Label12.Caption = ""
Label15.Caption = ""
Combo2.Text = ""
21
DTPicker1.Value = Date
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub
rs2.AddNew
rs2("id") = Label9.Caption
rs2("cid") = Combo1.Text
rs2("name") = Label12.Caption
rs2("person") = Label5.Caption
rs2("qua") = Text2.Text
rs2("exp") = Text3.Text
rs2("gender") = Combo2.Text
rs2("place") = Text4.Text
rs2("natjob") = Text5.Text
rs2("vac") = Text6.Text
rs2("date") = DTPicker1.Value
rs2.Update
End Sub
Combo1.Text = ""
22
Label12.Caption = ""
Label15.Caption = ""
Combo2.Text = ""
DTPicker1.Value = Date
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
End Sub
rs1.MoveFirst
Combo1.AddItem rs(0)
rs.MoveNext
rs1.MoveNext
Wend
End Sub
con.Close
23
End Sub
Dim a As String
rs.MoveFirst
While Notrs.EOF
Label12.Caption = rs(2)
End If
rs.MoveNext
Wend
End Sub
rs2.MoveFirst
Label5.Caption = rs2(1)
End If
rs2.MoveNext
24
Wend
End Sub
rs4.AddNew
rs4("rid") = Combo1.Text
rs4("cname") = Label12.Caption
rs4("sid") = Combo2.Text
rs4("sname") = Label5.Caption
rs4("written") = Text1.Text
rs4("gd") = Text2.Text
rs4("final") = Text3.Text
rs4("total") = Text4.Text
rs4("result") = a
rs4.Update
End Sub
rs1.MoveFirst
25
While Not rs1.EOF
Combo1.AddItem rs(0)
rs.MoveNext
rs1.MoveNext
Wend
rs3.MoveFirst
Combo2.AddItem rs2(0)
rs2.MoveNext
rs3.MoveNext
Wend
End Sub
con.Close
End Sub
a = "Selected"
Else
a = "Rejected"
End If
End Sub
26
Dim con As New ADODB.Connection
If (rs1.Fields(0) = 0) Then
Label12.Caption = 1
Else
Label12.Caption = rs1.Fields(0) + 1
End If
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Combo2.Text = ""
End Sub
rs.AddNew
rs("id") = Label12.Caption
rs("name") = Text1.Text
rs("gender") = Combo2.Text
rs("address") = Text3.Text
27
rs("city") = Text2.Text
rs("mono") = Text4.Text
rs("email") = Text5.Text
rs("qua") = Text6.Text
rs.Update
End Sub
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Text6.Text = ""
Combo2.Text = ""
End Sub
End Sub
con.Close
End Sub
28
CHAPTER IV
REPORT GENERATION
Login Form
29
30
MDI Form
31
Company Details Form
32
Requirement Details Form
33
Interview Score Details Form
34
Student Details Form
35
Company Detail View
36
37
Requirement Details View
38
Student Detail View
39
Interview Details View
40
CHAPTER V
CONCLUSION
This project work gives sufficient knowledge and satisfaction. This computer project is a
milestone in my academic activity.
This project has been analyzed, designed and developed with meticulous care and can be
executed without any faults or errors.
I hope that this project will definitely to reach the Customer with effectively.
41