Importing Path Info to a Record

S

Steve H

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.
 
G

Graham Mandeno

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>
 

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