capture error file names when importing
From: Minh Le (MinhLe_at_discussions.microsoft.com)
Date: 03/09/05
- Next message: Ron Gibson: "Macola Dos Version / BTRIEVE"
- Previous message: OveB: "Re: Filenames to a field"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 9 Mar 2005 06:31:16 -0800
Hi all,
I would like to capture error files that are failed to import. Below is my
code
Dim myfile
Dim mypath
mypath = "C:\Documents and Settings\"
myfile = Dir(mypath & "*.xls")
While myfile <> ""
'this will import ALL the excel files (one at a time, but automatically)
in this folder. Make sure that's what you want.
DoCmd.TransferSpread*** acImport, 8, "PR", mypath & myfile, True
I need some code here to capture files that are failed.I don't know how to
write the code to check for error files.
if DoCmd.TransferSpread*** acImport, 8, "PR", mypath & myfile, True is
not imported, then
How do i check the line above for error file???
MsgBox "Transfer Failed: " & vbCrLf & "XLS: " & myfile&
End If
myfile = Dir
Wend
- Next message: Ron Gibson: "Macola Dos Version / BTRIEVE"
- Previous message: OveB: "Re: Filenames to a field"
- Messages sorted by: [ date ] [ thread ]