QUOTE(vb5prgrmr @ 4 Jun, 2009 - 11:45 PM)

>Do I replace the .AddNew/.Update section?
Yes.
strSQL = "INSERT INTO YourTableName(YourFieldName) VALUES ('" & variable & "')"
Where YourFileName is you will need to list the fields of the database seperated by a comma (Field1, Field2) and where variable is "('" & var1 & "," & var2 & "')"
Good Luck
Here is what I have at this point:
Private Sub Command1_Click()
Dim conConnection As New ADODB.Connection
Dim cmdCommand As New ADODB.Command
Dim AccPath As String
AccPath = App.Path & "\AccessFiles\"
conConnection.ConnectionString "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\" & "database.mdb;Mode=Read|Write"
conConnection.CursorLocation = adUseClient
conConnection.Open
With cmdCommand
.ActiveConnection = conConnection
.CommandText = "SELECT * FROM tabTestTable;"
.CommandType = adCmdText
End With
Dim Acc As String
Dim AccDate
Dim AccNum
Dim AccSt
Dim AccLot
Open AccPath & "Access.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, Acc
AccDate = Mid$(Acc, 1, 8)
AccNum = Mid$(Acc, 10, 3)
AccSt = Mid$(Acc, 14, 2)
AccLot = Mid$(Acc, 17, 1)
strSQL = "INSERT INTO tabTestTable(Date,LotNum,State,LotType) VALUES ('" & AccDate & "," & AccNum & "," & AccSt & "," & AccLot & "')"
con.Execute strSQL
Loop
Close #1
conConnection.Close
Set conConnection = Nothing
Set cmdCommand = Nothing
End Sub
After I run it I get this error "Invalid use of property" and the code highlights the conConnection.ConnectionString. I did not find anything out on the internet to give me a hint. Anything you see or know could be causing the error?
Thanks,