<Previous Lesson> <<Home>>< Next Lesson>
DataGrid control is the not the default item in the Visual Basic control
toolbox, you have to add it from the VB6 components. To add the DataGrid control, click on the project on the menu bar and select components to access the dialog box that displays all the available VB6 components, as shown in the diagram below.
Select Microsoft DataGrid Control 6.0 by clicking the checkbox beside
this item. Before you exit the dialog box, you also need to select the
Microsoft ADO data control so that you are able to access the database.
Last, click on the OK button to exit the dialog box. Now you should be
able to see that the DataGrid control and the ADO data control are added
to the toolbox. The next step is to drag the DataGrid control and the
ADO data control into the form.
The components dialog box is shown below:



Before you proceed , you need to create a database file using Microsoft Access. Here we create a file to store the information of my books and we namedthe table book. Having created the table, enter a few records, as shown in the table below:

Next, you need to connect the database to the ADO data control. To do that, right click on the ADO data control and select the ADODC properties, the following dialog box will appear.




0 comments :
Post a Comment