VB Code:
  1. Private Sub DatabaseM_Click()
  2.     Dim ADOCn       As ADODB.Connection
  3.     Dim rsValues    As ADODB.Recordset
  4.     Dim ConnString  As String
  5.         ConnString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
  6.             "Data Source=" & CommonDialog1.FileName & ";" & _
  7.             "Persist Security Info=False"
  8.         Set ADOCn = New ADODB.Connection
  9.    
  10.     ADOCn.ConnectionString = ConnString
  11.     ADOCn.Open
  12.     Set rsValues = New ADODB.Recordset
  13.     rsValues.Open "SELECT * FROM Overview", ADOCn, adOpenKeyset, adLockOptimistic, adCmdText
  14.     With rsValues
  15.         .AddNew
  16.         .Fields("ProjName").Value = ProjNameT.Text
  17.         .Fields("OilComp").Value = OilCoT.Text
  18.         .Fields("GeoCon").Value = GeoT.Text
  19.         .Fields("SurveyCon").Value = SurvT.Text
  20.         .Fields("DrillCon").Value = DrillT.Text
  21.         .Fields("Total").Value = AcresT.Text
  22.         .Fields("TodDate").Value = DateT.Text
  23.         .Fields("StartDate").Value = StartT.Text
  24.         .Update
  25.  
  26. End With
  27. ProjNameT.Text = vbNullString
  28. OilCoT.Text = vbNullString
  29. GeoT.Text = vbNullString
  30. SurvT.Text = vbNullString
  31. DrillT.Text = vbNullString
  32. AcresT.Text = vbNullString
  33. DateT.Text = vbNullString
  34. StartT.Text = vbNullString
  35. rsValues.MoveFirst
  36. End Sub

And also, Say that i have 70 textboxes instead of 9, is there anyway that i could use ADO without typing out all 70 textboxes and all 70 fields?