List External Files and Their Properties

G

Ganz

I am building an application for tracking supply contracts. Each
contract is summarised in the database and the associated paperwork
such as the contract itself are imaged and the files stored on the
server. I want to be able to open associated files from the summary
record in the database by clicking on the file name using
Aplication.Hyperlink. This works fine when I know exactly which file
I am after and have it hard coded, but I want to be able to have a
form which lists all files associated with that contract. For
instance contract RAU0001 has its associated files all begining with
that name ie RAU0001.1.tif, RAU0001.2.tif and RAU0001.pdf.

Each of these files has as its title in the properties as "RAU0001
Main Contract", "RAU0001 Addendum 1", "RAU0001 Price Increase",
corresponding to the above mentioned file names.

Is there a way of displaying these file names *and the title from
their properties* in a form so that a user can select the appropriate
document for display?

Many thanks for any help.

Mark Kaye
 
B

Bob Quintal

I am building an application for tracking supply contracts.
Each contract is summarised in the database and the associated
paperwork such as the contract itself are imaged and the files
stored on the server. I want to be able to open associated
files from the summary record in the database by clicking on
the file name using Aplication.Hyperlink. This works fine
when I know exactly which file I am after and have it hard
coded, but I want to be able to have a form which lists all
files associated with that contract. For instance contract
RAU0001 has its associated files all begining with that name
ie RAU0001.1.tif, RAU0001.2.tif and RAU0001.pdf.

Each of these files has as its title in the properties as
"RAU0001 Main Contract", "RAU0001 Addendum 1", "RAU0001 Price
Increase", corresponding to the above mentioned file names.

Is there a way of displaying these file names *and the title
from their properties* in a form so that a user can select the
appropriate document for display?

Many thanks for any help.

Mark Kaye
You can grab the list of file names in a directory using the DIR
statement. You could build the recordsource for a combo or
listbox, or populate a subtable
this should build the valuelist you can use in a combo.

dim spath as atring
dim sfile as string
dim sList as string

spath = C:\whatever\scanned\
sfile = dir( spath & "RAU0001*.*")

do while len(trim(sfile)) >0
slist = slist & """" & sfile & """;"
dir
loop

if len slist >0 then
slist = left(slist, len(slist) -1
endif
 

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