Step by step how to linking microsoft access database to visual basic

Visual Basic is one of programming language that is still very popular to this day. Besides easy to use, this programming language can run on the Windows operating system to the latest release. Why to this day I still love the Visual Basic? Yeah, I've fallen in love with Visual Basic since the first sight :-D.

By the way, here I want to share my experience about how to create a database program and how to linking Microsoft access database file to visual basic. It is really quite easy, but if you've never to practice it, you must be still in confused.


Okay, we straight to practice. Open your Visual Basic!. We create a simple database as an exercise. Follow the steps as shown below!


A. Creating Database
1. On the menu bar, click on "Add-Ins" and then click on the sub menu "Visual Data Manager"

step-1

2. I assume you are now in the Visual Data Manager program. On the menu bar, click "File" ---> "New..." ---> "Microsoft Access" ---> "Version 7.0 MDB..."

step-2

3. You will be prompted to save the file name of the database you want to create. Save and remember the location of the database!

step-3

4.Create a new table! Right click "Properties", and then select "New Table"

step-4

5. Give a name to the table! Example the table name is "table1".

step-5

6. Now, make list of field by clicking the "Add Field" button. For this example, we created only two field pieces.

step-6

7. To process the table and the field, do not forget to click on the "Build the Table" button.

8. Create a new database by double clicking on the "table1".

step-8

and then, click "Add" button to create new database.

step-8B

9. Fill in the name of each field as an example of database.

step-9

10. Click "Update" button to save your database.

B. Linking database to Visual Basic program.
Back to the Visual Basic program. To associate the database that has been created, follow the steps below!

1. In form1, add two textbox [Text1 and Text2] and one Data1.

linking-1

2. We set the properties for each of these components.

Properties for Data1
[DatabaseName] = Name of the database that we have created.
[RecordSource] = table1

Properties for Text1
[DataSource] = Data1
[DataField] = username

Properties for Text2
[DataSource] = Data1
[DataField] = password

3. If you followed the steps correctly, you will see the result as shown below.

linking-3

This is an example of the basics of creating or connecting/linking microsoft access database. Hopefully this article can help you learn the basics of creating a database using the Visual Basic program.




Keyword: How to make database in Visual Basic | How to connecting Microsoft Access Database to Visual Basic | How to linking Microsoft Access Database to Visual Basic | Basic of Database in Visual Basic | Examples of Database in Visual Basic

You may also like: