Microsoft KB Archive/207827

= ACC2000: Error Message When You Attempt to Import or Link Certain File Types by FTP =

Article ID: 207827

Article Last Modified on 7/13/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q207827



Novice: Requires knowledge of the user interface on single-user computers.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
When you attempt to import or link certain types of files from a File Transfer Protocol (FTP) site in Microsoft Access, you may receive an error message.

If you try to import or link a table from an Access database, you may receive the following error message:

Not a valid file name.

If you try to import or link a text file, you may receive the following error message:

Bad file name or number.



CAUSE
This behavior can occur because, for text files, Access uses an Open File command to populate the wizard with data; the Open File command does not support FTP.

For Access databases, this behavior is by design. Access does not support importing or linking an Access database through an FTP server.

NOTE: Access online Help explains that you cannot import or link through FTP to an Access database; however, Help does not mention that you cannot import or link text files through FTP. For Help topic locations, see the "References" section.



RESOLUTION
To work around this issue, copy or move the file to a local hard disk, floppy disk, or network drive, and then import or link the file.

You can import a text file from an FTP site if you use the TransferText action or method and import the file through a Visual Basic for Applications macro.



MORE INFORMATION
Some types of files, such as dBASE (.dbf) files, can be linked or imported by FTP, but text (.txt) and Access database (.mdb) files cannot.

Steps to Reproduce the Behavior
The following example assumes that you are using Microsoft Internet Information Server (IIS) with Microsoft Windows 2000 or Windows NT.
 * 1) Create a text file on an FTP site that you can access, such as C:\Inetpub\Ftproot.
 * 2) Start Access and open the sample database Northwind.mdb.
 * 3) On the File menu, point to Get External Data, and then click Import.
 * 4) Select Text Files in the Files of type box.
 * 5) Type the path to your FTP server in the File name box, for example, FTP://localhost.
 * 6) Select your text file, and then click the Import button.

