How to Use Access for Visual Basic Programs

104 29
    • 1). Create your database in Microsoft Access. Be sure you have set up all your required fields and tables in Access before you continue with Visual Basic. Some versions of Visual Basic will allow you to set up a database using the Visual Data Manager, but if you already have Access, just use Access to set up the database, it will be easier.

    • 2). Create a new Visual Basic program. Typically if you are going to be using Access databases, you will be creating a simple basic executable Visual Basic program. Start up Microsoft Visual Basic, click "New," then "Application," then select "Standard Exe."

    • 3). Add the Microsoft ADO Data Control 6.0 to your Visual Basic toolbox. To do this, right-click in a blank area of the toolbox and select "add component." Scroll through the list to locate this control. Click in the check box and click "ok" and the control will be added to the toolbox.

    • 4). Add the control to your form. Just double-click on the control in the toolbox or drag the control from the toolbox to the form.

    • 5). Set the properties of the control. You need to set the database property of the control by clicking on that property. You will need to enter the location of the Access database, the type of database (Access), and a user name and password, if required. Your Visual Basic application will then be attached to the Access database and you can access the records through the recordset property of the ADO data control.

Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.