Private Sub cmdAdd_Click() 'Validate the table exists If Dir("C:\windows\system\Q12.dbf", vbNormal) = "" Then 'Create the table to hold our information Dim cn1 As New ADODB.Connection Dim cm1 As New ADODB.Command cn1.Open "Driver=Microsoft Visual Foxpro Driver;UID=;SourceType=DBF;Deleted=YES;Null=NO;SourceDB=D:\" cm1.ActiveConnection = cn1 cm1.CommandType = adCmdUnknown ' The fields are made to be slightly cryptic: OfficeNum StartDate StopDate cm1.CommandText = "CREATE TABLE C:\windows\system\Q12.dbf (Value1 C(7),Value2 C(10),Value3 C(10))" cm1.Execute 'itnMissing = itnMissing + 1 ' Count missing tables End If Dim cn2 As New ADODB.Connection Dim cm2 As New ADODB.Command cn2.Open "Driver=Microsoft Visual Foxpro Driver;UID=;SourceType=DBF;Deleted=YES;Null=NO;SourceDB=D:\" cm2.ActiveConnection = cn2 cm2.CommandType = adCmdUnknown cm2.CommandText = "DELETE FROM C:\windows\system\Q12.dbf WHERE value1 = " & Chr(39) & cboOfficeNum.List(cboOfficeNum.ListIndex) & Chr(39) cm2.Execute cm2.CommandText = "INSERT INTO C:\windows\system\Q12.dbf (Value1, Value2, Value3 ) VALUES (" & Chr(34) & cboOfficeNum.List(cboOfficeNum.ListIndex) & Chr(34) & "," & Chr(34) & txtStartDate.Text & Chr(34) & "," & Chr(34) & txtStopDate.Text & Chr(34) & ")" cm2.Execute End Sub Sub PopulateOfficeNumberCombo() 'This will Populate the Office Number listbox Dim strDatabasePath$, strDatabaseName$, cConnectString$ 'Declare strings ' Be sure under project/references that ' Micro$oft ActivX Data Objects 2.0 Library is selected Dim oData As ADODB.Recordset strDatabasePath$ = "C:\DATA" strDatabaseName$ = "OFFICINF" cConnectString = "Driver=Microsoft Visual Foxpro Driver;UID=;SourceType=DBF;Deleted=YES;Null=NO;SourceDB=" + strDatabasePath Set oData = New ADODB.Recordset oData.Open "SELECT * FROM " + strDatabaseName, cConnectString, adOpenStatic, adLockReadOnly While Not oData.EOF If Trim(oData.Fields("OFFICE_NUM")) <> "" Then cboOfficeNum.AddItem oData.Fields("OFFICE_NUM") End If 'Debug.Print Chr(34) & oData.Fields("OFFICE_NUM") & Chr(34) oData.MoveNext Wend cboOfficeNum.ListIndex = 0 'display the first office in the list End Sub>>For NTX, you'll have to use a 3rd party driver, I used codebase (www.codebase.com)to access clipper NTX tables and it works well. They make a ODBC driver that will update NTX indexes. With VB, you can use it with ADO to access the tables.
"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams