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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TransferText Overwrite Existing Table Problem

Status
Not open for further replies.

jwkolker

Programmer
Jan 9, 2003
68
US
Hello:
When I run this code - I am having to "zap" the contents of the table using a delete query - I want to set a parameter that will cause the transfertext command to simply overwrite the existing table simular to the way I would get prompted if I were to do it manually using the get external data file menu option - any guidance from the TeKTips Gurus would be greatly appreciated.

The code that I am using follows:

Code:
Public Function marketmonthlyimport()


Dim strInput As String, strMsg As String

On Error GoTo Oppsnofile:

    strMsg = "Enter Month and Year of your import like this MMMYY - MAR03 for example..."
    strInput = InputBox(Prompt:=strMsg, _
        Title:="DPMDataMaster Reporting Month Selection...", XPos:=2000, YPos:=2000)
   
DoCmd.SetWarnings False

DoCmd.OpenQuery "q-del-t-mm-allmkt"
DoCmd.TransferText acImportDelim, "Allmkts_month Import Specification", _
  "t-mm-allmkts_month", "P:\SASCSVOutput\" & strInput & "\CSVProdMon\t-mm-allmkts_month.csv", -1

DoCmd.SetWarnings True

Exit Function

Oppsnofile:
DoCmd.SetWarnings True


End Function

John Kolker
Programmer
jwkolker@comcast.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top