Import .dbf files with long names into Access

G

Guest

In attempting to import dBaseIV files into Access, I get an error message
that the Jet DBE can't find the object. The dBaseIV files have long
filenames (Ex; HN021372_ooedr5_1546.dbf) generated by a proprietary program
in a hand-held datalogger. If I rename to eight characters, they import
fine, however I am receiving 150 files per day and the time to manually
rename is too long. Is there a way to get Access to import dBaseIV files
with long names?
 
K

Ken Snell [MVP]

Not directly. But you could run VBA code in ACCESS that would rename the
files to "short" names.
 
D

david epsom dot com dot au

If you are using code to import, you can use the
windows api to look up the short name for each file:

Declare Function GetShortPathName Lib "kernel32" _
Alias "GetShortPathNameA" (ByVal lpszLongPath As String, _
ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long

If you have an exceptionally bright windows geek on tap,
you can also re-configure windows so that the file open
dialog shows short names.

(david)
 

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