The general steps listed below should give you a good start;
Create connection
- Drag OleDbConnection tool (Data tab) to form
- Connection string property define the new connection string
- Provider tab, utilize Microsoft Jet 4.0 OLE DB Provider then Next
- Navigate to database file *.mdb
Create data adapter
- Drag the OleDbDataAdapter tool (Data tab) to form
- Select the connection just made above then Next
- Make sure SQL statements radio button is chosen then Next
- Select Query builder to add associated database table
- Select fields from chosen table
Generate the dataset
- Click Data pull down menu at top of screen, click generate dataset
- Enter name of dataset
- Choose table(s) to add to the dataset
Fill the dataset within Load event
Bind data to form control
************* Code Example *************************
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Fill dataset
Dim intRecords As Integer
Dim bndTemp As Binding
intRecords = odbdaFactory.Fill(dsParts)
'Bind form's text boxes
bndTemp = New Binding("Text", _ dsParts, "tblParts.fldPartNumber")
txtPartNo.DataBindings.Add(bndTemp)
bndTemp = New Binding("Text", dsParts, "tblParts.fldDescription")
txtDesc.DataBindings.Add(bndTemp)
bndTemp = New Binding("Text", dsParts, "tblParts.fldCost")
txtCost.DataBindings.Add(bndTemp)
bndTemp = New Binding("Text", dsParts, "tblParts.fldSalesPrice")
txtSalesPrice.DataBindings.Add(bndTemp)
bndTemp = New Binding("Text", _ dsParts, "tblParts.fldQuantityOnHand")
txtQtyOnHand.DataBindings.Add(bndTemp)
End Sub