Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete First 3 Rows

Status
Not open for further replies.

SeaRay

Technical User
Jan 8, 2002
20
0
0
US
I import a delimited file into access. I saved an import specification and named it "ProdSpec". My problem is that I would like to start in the 4th row.(The first 3 rows are text, the rest are numerical) It is my understanding that can't be done, so when I run the procedure, it creates a second table with the errors in it (the text). So I wrote into the code to delete the "Prod_ImportErrors" table.

If I would write code to delete the first three rows, that would solve the rest of my problems. (RickSpr, I am trying! I'm just not that good yet). Can someone help me add this code?

Thanks, Rick Ruscin

Private Sub Import_Click()

DoCmd.DeleteObject acTable, "tblprod"

Dim strPathName As String

strPathName = (DatePart("d", [Forms]![Daily Sales]![Date]))

DoCmd.TransferText acImportDelim, "ProdSpec", "tblProd", "C:\Program Files\SSM\Day\" & strPathName & ("\Prod.txt")

DoCmd.DeleteObject acTable, "Prod_ImportErrors"

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top