0% found this document useful (0 votes)
25 views52 pages

Malu Project

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views52 pages

Malu Project

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 52

PROJECT ON

AIRLINE RESERVATION SYSTEM

VB & MS ACCESS

Made By:-

A.MALATHI

ACKNOWLEDGEMENT
I would like to take this opportunity to express my gratitude towards all
the people who have in various ways, helped in the successful completion of
my project.

I must convey my gratitude to Ms. …………… for giving me the


constant source of inspiration and help in preparing the project, personally
correcting my work and providing encouragement throughout the project.

I also thank all my faculty members for steering me through the tough as
well as easy phases of the project in a result oriented manner with concern
attention.

CERTIFICATE
This is to certify that this is a bona fide record to the project work done
satisfactorily at ….. By …….. .of.......

This report or the similar report on this topic has not been submitted for any
other examination and does not form part of any other course undergone by the
candidate.

Signature of Project Guide

Name: Malathi

CONTENTS
1. INTRODUCTION

o PROJECT DESCRIPTION

2. SYSTEM SPECIFICATION

1) HARDWARE SPECIFICATION
2) SOFTWARE SPECIFICATION

3. LANGUAGE SPECIFICATION

1) NET FRAMEWORK

 COMMON LANGUAGE
 NET FRAMEWORK CLASS LIBRARY

2) VB.NET

 OVERVIEW
 BASIC CONTROLS
 ADO.NET OBJECT MODEL
 ENVIRONMENT
 VISUAL STUDIO.NET HIGHLIGHTS

3) MS ACCESS

 MS ACCESS 7.0
 ARCHITECTURE
 DATA STORAGE
 DATABASE

4. SYSTEM DESIGN
5. SAMPLE SCREENSHOTS

6. SAMPLE CODING

7. TESTING AND DEBUGGING

8. CONCLUSION
ABSTRACT

This project entiled as “Airway Reservation Management System” is


designed by using visual basic as front end and access as back end. The project
is used by the customers or people. This project through customers or people
can easily login in the Airway reservation. Easily ,register under their choices .
Customers are daily motivated by this Quotes Of The Day button. Customers
or people easily get the daily updates using this project.
INTRODUCTION

The entire project has been developed keeping in view of the distributed client
server computing technology, in mind. The specification has been normalized up 2NF to
eliminate all the anomalies that may arise due to the database transaction that are executed by
the general users and the organizational administration. The user interfaces are browser
specific to give distributed accessibility for the overall system. The internal database has been
selected as database MS Access.

The Airline Reservation System project is an implementation of a general Airline


Ticketing website like Orbitz, which helps the customer to search the availability and prices of
various airline tickets, along with the different packages available with the reservations.
This project also covers various features like online registration of the users,
modifying the details of the website by the management staff or administrator of the website
by adding deleting or modifying the customer details flights or packages information in
general this website would be designed to perform like any other airline ticketing website
available online.

The Project “Airway reservation Managem ent System” contains the following
Modules

They Are

➢ Login Module
➢ Customer reservation Module
➢ Cancellation Module
➢ Postpone Module
➢ Feedback
MODULE1:(Login module)
In this module the User can enter their user name, password , to login into the
application.

MODULE2:(Reservation module)
In this module the user can select and book their flight. And the Administrator
can view the booking details .

MODULE3:(Cancellation Module)
In this module the user can enter their personal details which they given
during booking and cancel the flight.

MODULE4:( Postpone Module)


In this module the user can enter their personal details which they given
during booking and postone the fligh

MODULE5:( Feedback Module)


In the module the user can give feedback about their experience and the flight.
PROJECT DESCRIPTION

System Requirement

➢ Software Requirement
1) Microsoft Visual studio 6.0 Ultimate.
2) Microsoft .Net Framework.
3) Front End: C#.NET.
4) Back End: Microsoft Access Database 2007.
5) Windows XP

➢ Hardware Requirement.
1) CPU: Pentium-IV Processor or any Processor.
2) Hard disk: 40GB or Above.
3) RAM: 1GB or Above.
INTRODUCTION TO MS ACCESS

1.What is MS Access?

Essentially, MS Access is a database management system (DBMS). Like other


products in this category, Access:
• Stores and retrieves data, o Presents information, and
• Automates repetitive tasks (such as maintaining accounts payable, performing
inventory control, and scheduling).

With Access you can develop easy-to-use input forms as you have seen from other
Windows applications. You can process your data and run powerful reports.

Access is also a powerful Windows application - probably the best


enduser/developer product ever written:
• Brings the productivity of database management to the usability and
consistency of Microsoft Windows. Because both Windows and Access are
from Microsoft, the two products work very well together. o Can work very
well together with other MS products such as VB, VC++, .net etc.
• Runs on the Windows 95, Windows 98, Windows NT, 2000, or XP platform,
so all the advantages of Windows are available in Access. You can cut, copy,
and paste data from any Windows application to and from Access. You can
create a form design in Access and paste it into the report designer.

Using ActiveX (formerly called OLE - Object Linking and Embedding) objects in
Windows and Microsoft Office 2000 products (Excel, Word, PowerPoint, and Outlook),
o You can extend Access into a true database-operating environment by
integrating it with these products.
• With the new Internet extensions, you can create forms that interact with data
directly from the World Wide Web and translate your forms directly into data
access pages for corporate intranets that work directly with your Internet
browser.

Access is not only a database manager but also a relational database manager:
• Provides access to all types of data and allows the use of more than one
database tables at a time.
• Can reduce the complexity of your data and make it easier to get your job
done.
• Can link an Access table with mainframe or server data or use a table created
in dBase or Excel.
• Can take the results of the link and combine the data with an Excel worksheet
quickly and easily. If you use Microsoft Office 2000, there is complete
interoperability between Access and Word, Excel, Outlook, and PowerPoint.
• Can easily manipulate Access data from your VB or VC applications.

MS Access has several versions: Access 2, Access 95, Access 97, Access 2000,
and Access 2003. If you are upgrading to Access 2000 from earlier versions of Access,
you should consider a few things. Earlier versions of Access databases must be converted
to Access 2000 format before they are usable. After an Access 2.0 or Access 95 database
is converted to Access 2000 format, it cannot be converted back; it’s unusable by Access
2.0, 95, or 97.

You can, however, save Access 2000 database in Access 97 format. As an Access
2000 user, you can open and work with Access 2.0, 95, or 97 data by attaching to them as
external databases, but you cannot modify any of the objects (forms, reports, queries, and
so on) you find in them.

2 .MS Access Usability Hierarchy

Figure 1 shows the original Microsoft marketing concept for Access. This simple
figure conveys the message that Access is usable at all levels.

Beginning at the lowest level of the hierarchy and moving upward, you see:

• Objects listed first; these give the end user the capability of creating tables,
queries, forms, and reports easily.
• By using functions/expressions, simple processing can be performed to
validate data, enforce a business rule, or display a number with a currency
symbol.
• Macros allow for automation without programming. o However, VBA (Visual
Basic for Applications) code lets the user program complex processes. o
Finally, by using Windows API (Application Programming Interface) calls to
functions or DLLs (Dynamic Link Libraries) written in other languages such
as C, Java, or Visual Basic, a programmer can write interfaces to other
programs and data sources. Similarly, the programmer can write the interfaces
from other applications to connect to the Access database.

Access is a set of tools for end-user database management. Access has: o a table
creator, o a form designer, o a query manager, o a data access page creator, and
o a report writer.
Access is also an environment for developing applications. Using macros or
modules to automate tasks, you can create user-oriented applications as powerful as those
created with programming languages —complete with the buttons, menus, and dialog
boxes. By programming in Visual Basic for Applications (known as VBA), you can
create programs as powerful as Access itself. In fact, many of the tools in Access (such as
Wizards and Builders) are written in VBA.

3. What Access Offers?

• Relational database management

Access provides true relational database management. Access includes:


• Definitions for primary and foreign keys, and has full referential integrity at the
database engine level itself (which prevents inconsistent updates or deletions).
• Tables in Access have data-validation rules to prevent inaccurate data regardless of
how data is entered, and every field in a table has format and default definitions for
more productive data entry. o Access supports all the necessary field types,
including Text, Number,
AutoNumber (counter), Currency, Date/Time, Memo, Yes/No, Hyperlink, and
OLE objects. When values are missing in special processing, Access provides
full support for null values.

The relational processing in Access fills many needs with its flexible architecture.
It can be used as a stand-alone database management system, in a file-server
configuration, or as a front-end client to products such as a SQL server. In addition,
Access features ODBC (Open Database Connectivity), which permits connection to
many external formats, such as SQL/Server, Oracle, Sybase, or mainframe IBM DB/2.
The program provides complete support for transaction processing, ensuring the
integrity of transactions. In addition, user-level security provides control over assigning
user and group permissions to view and modify database objects.

• Ease-of-use wizards

A Wizard can turn hours of work into minutes. Wizards ask questions about content,
style, and format, and then they build the object automatically. Access features nearly
100 Wizards to design: o databases, o applications, o tables, forms, reports, o graphs,
o mailing labels, o controls, and o properties.

• Importing, exporting, and linking external files

Access lets you import from or export to many common formats, including dBase,
FoxPro, Excel, SQL Server, Oracle, Btrieve, many ASCII text formats (including fixed
width and delimited), as well as data in HTML format.

Importing creates an Access table; exporting an Access table creates a file in the
native file format you are exporting to.

Linking (formally known as attaching) means that external data can be used
without creating an Access table. You can link to dBase, FoxPro, Excel, ASCII, and SQL
data. Linking to external tables and then relating them to other tables is a powerful
capability; you can link to Access, FoxPro, dBase, and SQL server.

• Multiple-table queries and relationships


One of the most powerful features in Access is also the most important - the
relationship that lets you link your tables graphically.

• You can even link tables of different file types (such as an Access table and a dBase
table); when linked, your table’s act as a single entity you can query about your data.
o You can select specific fields, define sorting orders, create calculated expressions,
and enter criteria to select desired records. The results of a query can be displayed in a
datasheet, form, or report.
• You do not have to set relationships in advance. Rather than set your relationships
permanently, you can use a query window to set them when you need to for a specific
purpose, such as a report.

• DDE and OLE capabilities

Through the capabilities of DDE (Dynamic Data Exchange) and OLE (Object
Linking and Embedding), exciting new objects can be added to Access forms and
reports.

• The objects that can be added include sound, pictures, graphs, and video clips. o You
can embed OLE objects (such as a bitmap picture) or documents from word
processors (such as Word or WordPerfect), or link to a range of cells in an Excel
spreadsheet. o By linking these objects to records in your tables, you can create
dynamic database forms and reports and share information between Windows
applications.

• Built-in functions

Access contains more than 200 functions (small built-in programs that return a
value) that perform tasks in a wide variety of categories. Access includes database,
mathematics, business, financial, date, time, and string functions. You can use them to
create calculated expressions in your forms, reports, and queries.

4 .A Review of Database Concepts

• What is a database?

Database is a computer term for a collection of information concerning a certain


topic or business application. Databases help you organize this related information in a
logical fashion for easy access and retrieval.

In a real manual file filing database system, you probably have in/out baskets and
some type of formal filing method. Information is accessed manually by opening a file
cabinet, taking out a file folder, and finding the correct piece of paper. Paper forms are
used for input, per-haps with a typewriter. Information is found by sorting the papers
manually or by copying desired information from many papers to another piece of paper.

A computer database is nothing more than an automated version of the


filing and retrieval functions of a manual paper filing system. Computer
databases store information in a structured format that you define. They can store
data in a variety of forms, from simple lines of text (such as name and address)
to complex data structures that include pictures, sounds, or video images.

A relational database management system (RDBMS) such as Access stores data in


many related tables. The user can ask complex questions from one or more of these
related tables, with the answers returning as forms and reports.

• Database terms
Microsoft Access follows traditional database terminology. The terms database, table,
record, field, and value indicate a hierarchy from largest to smallest.

Databases

In Access, a database is the overall container for the data and associated objects.
Database objects include:

• tables, o queries, o forms, o reports, o macros, and o modules.

In some computer software products, the database is the object that holds the
actual data; in Access, this is called a table.

Access can work with only one database at a time. Within a single Access
database, however, you can have hundreds of tables, forms, queries, reports, pages,
macros, and modules - all stored in a single file with the file extension .MDB (multiple
database) or .ADP if you are using SQL Server.

Tables

A table is a container for raw data. When data is entered in Access, a table
stores it in logical groupings of similar data (the Students table, for example,
contains data about students) and the table’s design organizes the information
into rows and columns. Figure 2 is a typical Access table design; its datasheet
(also known as a browse table or table view) displays multiple lines of data in
neat rows and columns.
Figure 2. A database table design and datasheet.

Records and fields

As shown in Figure 2, the datasheet is divided into rows called records and
columns called fields.
• The data shown in the table has columns of similar information, such as StudentID,
Sname, GPA; these columns of data items are fields.
• Each field is identified as a certain type of data (Text, Number, Date, and so on) and
has a specified length. Each field has a name that identifies its category of
information.

The rows of data within a table are its records.

• Each row of information is considered a separate entity that can be accessed or


sequenced as desired. o All the fields of information concerning a certain student
are contained within a specific record.

Values

At the intersection of a row (record) and a column (field) is a value —the actual
data element. For example, Long, the Student Name of the second record is a data value.

• Why use more than one table?

A database contains one or more tables (that is, logical groupings of


similar data). Most applications that are developed in Access have several related
tables to present the information efficiently. An application that uses multiple
tables can usually manipulate data more efficiently than it could with one large
table.

Multiple tables simplify data entry and reporting by decreasing the input of
redundant data. By defining two tables for an application that uses customer information,
for example, you don’t need to store the customer’s name and address every time the
customer purchases an item.
• Database Objects and Views

If you are new to databases (or are even an experienced database user), before
starting to use Access you need to review and make sure that you understand some key
Access concepts. The Access database contains seven objects, which consist of the data
and tools you need to use Access:

Table Holds the actual data (uses a datasheet to display the raw
data)
Query Lets you search, sort, and retrieve specific data
Form Lets you enter and display data in a customized format
Report Lets you display and print formatted data, including
calculations and totals
Pages Lets you publish live forms to a corporate intranet
Macro Gives you easy-to-use commands to automate tasks without
programming
Module Program written in VBA

Datasheets:

Datasheets are one of the many ways by which data can be viewed. Although not
a database object, a datasheet displays a list of records from a table in a format
commonly known as a browse screen or table view. A datasheet displays data as a series
of rows and columns (comparable to a spreadsheet). A datasheet simply displays the
information from a table in its raw form. This spreadsheet format is the default mode for
displaying all fields for all records.
Query:

A query is used to extract information from a database. A query can select and
define a group of records that fulfill a certain condition.

• You can use queries before printing a report so that only the desired data is
printed.
• Forms can also use a query so that only certain records (that meet the desired
criteria) appear onscreen.
• Queries can be used within procedures that change, add, or delete database
records.

An example of a query is when a WVU professor tries to retrieve the specified


student records with the name, course, and date when the course was taken. Apparently,
we need to use a query because we cannot obtain all the information we need from one
table. Instead of asking the question in actual English, the professor would use a method
known as QBE, which stands for Query by Example. Figure 3 is a typical query screen in
Access.

When you enter instructions into the QBE window, the query translates the instructions
and retrieves the desired data. In this example, the query first combines data from the
Student, the Course, and the StudentCourse tables. Then it retrieves the required fields.
Access then filters the records, selecting only those in which the value of DateTaken is
later than 9/1/2001. It sorts the resulting records first by student ID and then by student
name within the student IDs that are alike. Finally, the records appear onscreen in a
datasheet.
Figure 3. A typical query.

These selected records are known as a dynaset —a dynamic set of data that can
change according to the raw data in the original tables.

After you run a query, the resulting dynaset can be used in a form that can be
displayed onscreen in a specified format or print on a report. In this way, user access can
be limited to the data that meets the criteria in the dynaset.

Data-entry and display forms:

Data-entry forms help users get information into a database table in a quick, easy,
and accurate manner. Data-entry and display forms provide a more structured view of the
data than does a datasheet. From this structured view, database records can be viewed,
added, changed, or deleted. Entering data through the data-entry forms is the most
common way to get the data into the database table. Figure 4 is a typical form.

Data-entry forms can be used to restrict access to certain fields within the table.
You can also use these forms to check the validity of your data before you accept it into
the database table.
Most users prefer to enter information into data-entry forms rather than datasheet
tables; data-entry forms can be made to resemble familiar paper documents. Forms make
data entry selfexplanatory by guiding the user through the fields of the table being
updated.

Figure 4. A typical data-entry form.

Reports

Reports present your data in printed format. You can create several different types
of reports within a database management system. For example, your report can list all
records in a given table, such as a student table. You can also create a report that lists
only the students who meet a given criterion, such as all those who have the GPA 3.5 and
above. You do this by incorporating a query into your report design.

Your reports can combine multiple tables to present complex relationships among
different sets of data. When you design your database tables, keep in mind all the types
of information you want printed. Doing so ensures that the information you require in
your various reports is available from within your database tables.
INTRODUCTION TO VISUAL BASIC PROGRAMMING

Visual Basic (VB) is the fastest and easiest way to create applications for
MS Windows. Whether you are an experienced professional or brand new to
Windows programming, VB provides you with a complete set of tools to simplify
rapid application development.

1. What is Visual Basic?

The “Visual” part refers to the method used to create the graphical user
interface (GUI). Rather than writing numerous lines of code to describe the
appearance and location of interface elements, you simply put prebuilt objects
into place on screen.
The “Basic” part refers to the BASIC (Beginners All-purpose Symbolic
Instruction Code) language. We need to notice that VB has evolved from original
BASIC language and now contains several hundred statements, functions, and
keywords, many of which relate directly to the Windows GUI.
The VB programming is not unique to Visual Basic. The following
applications or programming also used VB:
• VBA in MS Word, Excel, and Access
• VB Script for web-based programming
• Visual Basic Concepts

It is necessary for us to have a better understanding some of the key concepts


VB has built. A simplified version of the workings of Windows involves three
key concepts – windows, events, and messages.
A window is a rectangular region with its own boundaries. You are probably
already aware of several different types of windows: an explorer window, a
document window, or dialog box. Other types of windows include:
• command buttons
• icons
• text boxes
• option buttons, and
• menu bars

The MS Windows operating system manages all of these many windows by


assigning each one a unique id number (window handle or hWnd). Events can
occur through user actions such as mouse click or a key press, through
programmatic control, or even as a result of another window’s actions. Each time
an event occurs, it causes a message to be sent to the operating system. The
system processes the message and broadcasts it to the other windows.

• Event-driven programming vs. Procedural programming

In traditional or procedural applications, the application itself controls which


portions of code execute and in what sequence. Execution starts with the first line
of code and follows a predefined path through the application, calling procedures
as needed. In an event-driven application, the code does not follow a
predetermined path – it executes different code sections in response to events.
Events can be triggered by:

• the user’s actions,


• messages from the system or other applications, or - event from the
application itself.

• VB Integrated Development Environment


VB Integrated Development Environment (IDE) integrates many different
functions such as design, editing, compiling, and debugging within a common
environment while each of these tools would operate as a separate program in a
traditional development environment.

Starting VB IDE

You can start VB IDE either from clicking Start on the Taskbar or clicking VB
icon on the desktop (Figure 1).

• Object browser
• Code editor window
• Form layout window – allows you to position the forms in your application
using a small graphical representation of the screen.
• Immediate, Locals, and Watch windows under View menu are used for
debugging.

Environment Options
VB provides a great deal of flexibility, allowing you to configure the working
environment to best suit your individual style. Two different styles are
available for the VB IDE:
• single document interface (SDI): with SDI, all of the IDE windows are free to
be moved anywhere on screen.
• Multiple document interface (MDI): all of the IDE windows are contained
within a single resizable parent window.

To switch between SDI and MDI modes, a.


Select Options from the Tools menu.
The Options dialog box is displayed.

• Select the Advanced tab.

• Check or uncheck the SDI Development Environment check box.

The IDE will start in the selected mode the next time you start Visual Basic.

2 .VB Programming Examples

• Your First VB Application

I am using the classical example of “Hello World!” in programming textbook.


There are three main steps to creating an application in Visual Basic:

• Create the interface - Set properties - Write code.


In our example here, we want to display “Hello World!” in a text box once
you click a command button.

• Creating interface: add a text box and a command button

• Setting properties

• Writing code: double click the command button, then code editor window will
be displayed, type text1.text = “Hello World!”

• Running application

• Simple VB Example for Calculating Basal Area of a Tree

Once the user enters the DBH for a tree, the basal area for that tree should be
displayed in a text box. The basal area is calculated by using the following equation:

BA = 0.005454154*DBH2
Where, BA is basal area in
ft2 and DBH is the tree’s
diameter at breast height in
inches.

The results should be displayed in a list box for comparison among trees. Here
are the controls we need in this project:

• text box
• list box
• command button
Creating a VB Project

From the Start menu, click All Programs|MS Visual Studio 6.0|Visual Basic 6.0.
You start a new project by choosing New Project from the File menu, then selecting
Standard EXE in the New Project dialog box (when you first start Visual Basic,
the New Project dialog box is presented). VB creates a new project and displays
a new form for you. Now we need to design the interface. What you need to do
are as follows:

• Create a directory like that C:\For240\VBApps\CalBA\


• Start VB
• Put VB controls on the form (Figure 2)
• Name the controls (Table 1)
• Clear the default texts in the boxes
• Change the form caption to Calculate BA
• Save the project as prjCalBA
Figure 2. Interface for calculating BA.

Table 1. Property settings of the objects.


Object Property Setting
Form Name frmCalBA
Caption Calculate BA

Text1 Name txtDBH


Text

Text2 Name txtBA


Text

List1 Name lstResult


List

Command1 Name cmdCalBA


Caption Calculate BA

Command2 Name cmdClose


Caption Close

Coding

Double click the command button and a code-editing box will pop out.
Type the following lines under the command button 1 (cmdCalBA).

Private Sub cmdCalBA_Click()

Dim DBH, BA

DBH = txtDBH.Text
BA = 0.005454154 * DBH * DBH
txtBA.Text = BA

lstResult.AddItem DBH & ", " & BA

End Sub

Under command button 2 (cmdClose), type:

Private Sub cmdClose_Click()


End

End Sub

Remember!! Now, you need to save the project again by clicking the save
button on the menu bar.

Run the Project

Use the arrow button on the menu bar to run the project. You enter 12 in
DBH box, then click ‘Calculate BA’ button, you will add the first result to the
list box. If you change the DBH from 12 to 13, then click the ‘Calculate BA’
button; you will add the second result to the box (Figure 3). You can repeat the
above procedures as you wish.

Figure 3. Output of BA.

(3) Database Connection/Display Application


This application demonstrates how a data control and a DB grid control can
be used to display a table of information from a database. VB makes it easy to
access database information from within your application. The data control
provides the ability to navigate through the database recordset, synchronizing the
display of records in the grid control with the position in the recordset.

The following controls are needed in this application:


• Data control
• DBGrid control
• Command buttons

The database we are going to use is dbStudent created in the database


application section. The recordset is table tblCourse in the database.

Creating a Project

You begin creating the application by choosing New Project from the File
menu, then selecting Standard EXE in the New Project dialog box (when you
first start Visual Basic, the New Project dialog box is presented). VB creates a
new project and displays a new form. Now we need to design the interface –
putting data control, DBGrid control and buttons on the form. Since the DBGrid
is not in the default toolbox, we need to add it there. What we can do are:

• Select Components under Project menu, then the Components dialog box
will be displayed.
• Find Microsoft Data Bound Grid Control 5.0 (SP3) in the controls list box
and check the box to its left.
• Click the OK button, the icon for the DBGrid control will appear in the
toolbox.
Use the toolbox to draw the controls on the form (Figure 4).

Figure 4. Controls on the form.

Setting Properties

In the Properties window, set properties for the objects according to Table 2.
Use the default settings for all other properties.

Table 2. Property settings of the objects.


Object Property Setting
Form Name frmCourse
Caption Firstapp

Data1 Name dataCourse


Caption Courses

DBGrid1 Name DBGridCourse


Caption Courses
DataSource dataCourse

Command1 Name cmdDelete


Caption Delete

Command2 Name cmdClose


Caption Close

Now, save your project with a name of prjFirstapp. The interface of your
project will look like that (Figure 5).

Figure 5. The interface of your application.

Writing Event Code


Double-click the form or control to display the Code window, and then type the
code for each event procedure.

Add this code to Form_Load event procedure to connect the database and
retrieve data from the table when the program first starts.

Private Sub Form_Load()

ChDir App.Path 'Change to application directory


dataCourse.DatabaseName = "dbStudent.mdb" 'set database
name dataCourse.RecordSource = "Select * from tblCourse"
'set recoredset dataCourse.Visible = False 'make data
control invisible

End Sub

Add the following code to cmdDelete_Click event procedure to delete a selected


record from the DBGrid when the Delete button is clicked.

Private Sub cmdDelete_Click()

dataCourse.Recordset.Delete 'delete a selected record from


the table

End Sub

Add the code to cmdClose_Click event procedure to end the application when
you click Close button.
Private Sub cmdClose_Click()

Unload Me 'unload the form


End 'end the application

End Sub

Again, save your project at this point.

Running the Project

There are two ways that you can use to run the application:
• From Run menu, click Start
• From toolbar, click the button

Your application will be in the running mode (Figure 6).

Figure 6. Running the application.


You may need to test your program: a.
Add new courses
• Edit existed courses
• Delete a course
• Close your application

SAMPLE SCREENSHOTS
INFORMATION ABOUT THE AIRWAY RESERVATION
LOGIN:

SELECT YOUR OPTION:

RESERVATION FORM:
NEW DATA:

CANCELLATION FORM:
POSTPONE FORM:

FEEDBACK FROM PEOPLE:


SAMPLE CODING

LOGIN FORM:

Private Sub Command1_Click()

If (Text1.Text = "MALATHI" And Text2.Text =

"MALALA") Then

MsgBox ("YOUR USERNAME AND PASSWORD IS CORRECT")

Form3.Show

Else

MsgBox ("YOUR USERNAME AND PASSWORD IS INCORRECT")

End If

End Sub
Private Sub Command2_Click()

End

End Sub

Private Sub Form_Load()

Text1.Text = ""

Text2.Text = ""

End Sub

CHOOSE YOUR OPTION

CODING:

Private Sub ba_Click()

Form1.Show

End Sub

Private Sub Command1_Click()

MsgBox "FLIGHT BOOKING FORM"

Form2.Show

End Sub

Private Sub Command2_Click()


MsgBox "FLIGHT CANCELLATION FORM"

Form4.Show

End Sub

Private Sub Command3_Click()

MsgBox "FLIGHT POSTPONE FORM"

Form5.Show

End Sub

Private Sub Command4_Click()

MsgBox "FEEDBACK FORM"

Form6.Show

End Sub

FLIGHT BOOKING

CODING:

Private Sub Command1_Click()

Form3.Show

End Sub
Private Sub Command2_Click()

MsgBox "YOUR TICKET FOR FLIGHT IS BOOKED"

Form3.Show

End Sub

Private Sub Command3_Click()

Data1.Recordset.AddNew

MsgBox "ENTER THE NEW DATA"

End Sub

Private Sub Command4_Click()

Data1.Recordset.Update

MsgBox "CHANGES ARE UPDATED"

End Sub

Private Sub Command5_Click()

Data1.Recordset.Delete

MsgBox "SELECTED DATA ARE DELETED"

End Sub
Private Sub Form_Load()

Combo1.AddItem ("FIRST CLASS")

Combo1.AddItem ("ECONOMY CLASS")

Combo1.AddItem ("BUSINESS CLASS")

Combo1.AddItem ("PREMIUM ECONOMY CLASS")

Combo2.AddItem ("MALE")

Combo2.AddItem ("FEMALE")

Combo3.AddItem ("9.30 AM")

Combo3.AddItem ("12.30 PM")

Combo3.AddItem ("3.30 PM")

Combo3.AddItem ("6.00 PM")

Combo3.AddItem ("9.30 PM")

Combo3.AddItem ("12.30 AM")

Combo3.AddItem ("3.30 AM")

Combo3.AddItem ("6.00 AM")


Combo4.AddItem ("AIR INDIA")

Combo4.AddItem ("INDIGO")

Combo4.AddItem ("SPICE JET")

Combo4.AddItem ("VISTARA")

End Sub

CANCELLATION OF FLIGHT

CODING:

Private Sub Command1_Click()

MsgBox "YOUR FLIGHT CANCELLED SUCCESSFULLY"

Form3.Show

End Sub

Private Sub Command2_Click()

Form3.Show

End Sub
Private Sub Form_Load()

Combo1.AddItem ("FIRST CLASS")

Combo1.AddItem ("ECONOMY CLASS")

Combo1.AddItem ("BUSINESS CLASS")

Combo1.AddItem ("PREMIUM ECONOMY CLASS")

Combo2.AddItem ("AIR INDIA")

Combo2.AddItem ("INDIGO")

Combo2.AddItem ("SPICE JET")

Combo2.AddItem ("VISTARA")

End Sub

POSTPONE FLIGHT

CODING:

Private Sub Command1_Click()


MsgBox "FLIGHT POSTPONED SUCCESSFULLY"

Form3.Show

End Sub

Private Sub Command2_Click()

Form3.Show

End Sub

FEEDBACK

CODING:

Private Sub Command1_Click()

MsgBox "FEEDBACK SUBMITTED SUCCESSFULLY"

End Sub

Private Sub Command2_Click()

Form3.Show

End Sub

CONCLUSION

This project entitled “Airway reservation system” is developed using visual basic with
access . This project is used to login easily and help to register their name under their
needs . Existing customers as well as people can also book,cancel, postone their flight
ticket . So , customer or people easily register and book their tickets using this
application.

You might also like