Cannot import .csv files into Access 2000 under Windows XP

S

Steven

I am using a database (written in Access 2000), and it
can seemlessly import .csv files (comma separated values)
under the Windows 2000 operating system. It has done so
without a hitch for 6 months.

About 2 days ago I purchased a machine with Windows XP,
using the same database (written in Access 2000), I can
partially import .csv files. Sometimes it can, sometimes
it can't and sometimes the machine hangs.

So I went to the Windows update site and downloaded Jet
4.0 SP7 for Windows XP, thinking that this might solve
the problem (silly me). But of course after rebooting it
did'nt.

This is the code I am using:


Private Sub cmdGetFile_Click()
On Error GoTo ErrorRedo

DoCmd.SetWarnings False

Dim lsFileDnl As String
Dim lsFileZip As String
Dim fs As Object
Dim SaveTo As String
Dim pos As Integer

Dim stDocName1 As String
Dim stDocName2 As String

stDocName1 = "qryDel136DNLImport"
stDocName2 = "qry136dnlto136stand"


lsFileDnl = GetDNLFileName()
pos = InStr(lsFileDnl, ".")
lsFileDnl = Left(lsFileDnl, pos + 3)
Me.FilePath.Value = (lsFileDnl)
Set fs = CreateObject
("scripting.filesystemobject")
SaveTo = Left(lsFileDnl, pos) & "csv"
fs.copyfile lsFileDnl, SaveTo

DoCmd.OpenQuery stDocName1, acNormal, acEdit
DoCmd.TransferText
acImportDelim, "136DNLImportSpec", "Tbl136DNLimport",
SaveTo, -1
DoCmd.OpenQuery stDocName2, acNormal, acEdit
DoCmd.DoMenuItem acFormBar, acRecordsMenu,
acSaveRecord, , acMenuVer70
Kill SaveTo

Requery

Exit Sub

ErrorRedo:

Exit Sub

End Sub

Do I have to rewrite the above code for windows XP???

Please help
Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top