Importing Path Info to a Record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an old DBase App that has a great feature on it that I'd like to add
to my current Access database.

It is a database that stores documents. Starting with a blank form you can
fill out common fields of the documents you will importing. By clicking on an
IMPORT button you can browse to choose the documents you want to import. You
can choose one document or many within the folder you are browsing. Once you
have selected the files withing the folder, then clicked import, the path and
filename of the document files are written to the database one file per
record. Any ideas? Thanks.
 
Hi Steve

You can use the standard OpenFile dialog. For some sample code, see
http://www.mvps.org/access/api/api0001.htm.

It has a flag (OFN_ALLOWMULTISELECT) which allows multiple files to be
selected in one instantiation. The result is returned as a single string of
elements delimited by null characters (vbNullChar) and terminated by two
null characters. The first element in the string is the full path, and the
other elements are the names of the selected files. For example:

C:\MyData<null>File 1.doc<null>File2.xls<null>File3.mdb<null><null>
 
Back
Top