VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering

Browse Topics

- Getting started
- Data Types
- Modules
- Operators in VB6
- VB6 Variable
- VB6 Procedures
- VB6 Control Structures
- Loops in VB6
- VB6 Exit Do & With End With
- Arrays in VB6
- User-Defined Data Types
- VB6 Constants
VB6 Built-in Functions
- Date and Time in VB6
- VB6 Controls
- TextBox Control
- ComboBox & OptionButton
- Label & Frame
- PictureBox & ImageBox
- Timer Control
- ListBox & ComboBox
- VB6 ScrollBar
- Control Arrays in VB6
- Files controls in VB6
- VB6 CheckBox
- Forms in VB6
- Menus in VB6
- MDI Form in VB6
- InputBox
- MessageBox
- Mouse events
- Mouse Move
- Error Handling
Error Handling (2)
VB6 Database

You are here: Visual Basic > VB6 (Beginners Tutorial)

Tutorial Main Page | Previous Page | Contents | Next Page

Example - Phone Directory - Creating the Database

1. With this example, we begin the development of a simple phone directory. In the directory, we will keep track of names and phone numbers. We’ll be able to edit, add and delete names and numbers from the directory. And, we’ll be able to search the directory for certain names. In this first step, we’ll establish the structure for the database we’ll use. The directory will use a single table, with three fields: Name, Description, and Phone. Name will contain the name of the person or company, Description will contain a descriptive phrase (if desired) of who the person or company is, and Phone will hold the phone number.

2. Start the Data Manager. Use the previously defined steps to establish a new database . Use PhoneList as a Name for your database table. Define the three fields. Each should be a Text data type. Assign a size of 40 to the Name and Description fields, a size of 15 to the Phone field. When all fields have been defined, the screen should look like this:

When done with the field definitions, click Build the Table to save your new table. You will be returned to the Database Tables window.

3. We’re now ready to enter some data in our database. From the Database Tables window, right click the PhoneList table and select Open. The following window will appear:

At this point, add several (at least five - make them up or whatever) records to your database. The steps for each record are: (1) click Add to add a record, (2) fill in the three fields (or, at least the Name and Phone fields), and (3) click Update to save the contents.

You can also Delete records and Find records, if desired. You can move through the records using the scroll bar at the bottom of the screen. When done entering records, click Close to save your work. Select Exit from the Data Manager File menu. Your database has been created.


Tutorial Main Page | Previous Page | Contents | Next Page


Home | About Us | Privacy Policy | Contact Us

Copyright © | All Rights Reserved